diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d082641..a9eaa67 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -118,4 +118,24 @@ jobs: - name: Check formatting run: cargo fmt --check + docs: + runs-on: ubuntu-latest + steps: + - name: Check out repository + uses: actions/checkout@v4 + + - name: Install nightly Rust + uses: dtolnay/rust-toolchain@master + with: + toolchain: nightly + + - name: Activate cache + if: "!startsWith(github.head_ref, 'renovate/')" + uses: Swatinem/rust-cache@v2 + + - name: Check docs + run: cargo doc --no-deps --all-features --document-private-items + env: + RUSTDOCFLAGS: -Dwarnings + # vim:set et sts=2: diff --git a/Cargo.toml b/Cargo.toml index 5e8fee5..4dad865 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -138,6 +138,16 @@ unused_comparisons = "deny" useless_ptr_null_checks = "deny" while_true = "deny" +[lints.rustdoc] +bare_urls = "allow" +broken_intra_doc_links = "deny" +invalid_codeblock_attributes = "deny" +invalid_html_tags = "deny" +invalid_rust_codeblocks = "deny" +private_intra_doc_links = "deny" +redundant_explicit_links = "deny" +unescaped_backticks = "deny" + [lints.clippy] # Deny all warn-by-default lints: all = { level = "deny", priority = -1 }