From b63ec54863330b5c1137c1472137c75b8561a331 Mon Sep 17 00:00:00 2001 From: Ross Younger Date: Wed, 23 Oct 2024 23:27:24 +1300 Subject: [PATCH] enable docs lints, add to CI; add cargo doc task --- .github/workflows/ci.yml | 1 + .vscode/tasks.json | 17 +++++++++++++++++ Cargo.toml | 10 ++++++++++ 3 files changed, 28 insertions(+) create mode 100644 .vscode/tasks.json diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 84bfbef..e6b1228 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -52,3 +52,4 @@ jobs: # We care that the benchmarks build and run, not about their numeric output. # To keep the CI a bit leaner, do this in the dev profile. - run: cargo build --locked --all-targets + - run: cargo doc --document-private-items diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 0000000..2049b01 --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,17 @@ +{ + "version": "2.0.0", + "tasks": [ + { + "type": "cargo", + "command": "doc", + "problemMatcher": [ + "$rustc" + ], + "group": { + "kind": "build", + "isDefault": false + }, + "label": "rust: cargo doc" + } + ] +} \ No newline at end of file diff --git a/Cargo.toml b/Cargo.toml index 809c939..6714c87 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -67,3 +67,13 @@ variant_size_differences = "deny" [lints.clippy] pedantic = { level = "deny", priority = -1 } missing_errors_doc = "allow" + +[lints.rustdoc] +bare_urls = "deny" +broken_intra_doc_links = "deny" +invalid_codeblock_attributes = "deny" +invalid_html_tags = "deny" +invalid_rust_codeblocks = "deny" +missing_crate_level_docs = "deny" +private_intra_doc_links = "deny" +unescaped_backticks = "deny"