Skip to content

Commit

Permalink
Add linting of docs
Browse files Browse the repository at this point in the history
  • Loading branch information
jwodder committed Jul 13, 2024
1 parent 38525bf commit e332546
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
10 changes: 10 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand Down

0 comments on commit e332546

Please sign in to comment.