Add stricter doc test to justfile

In order to show warnings for unused imports etc. in doc examples an
extra test has been added to the justfile for `just lint` and the doc
test in `just sane` has been removed since it calls `just lint`.
This commit is contained in:
Jamil Lambert, PhD 2024-09-20 15:24:50 +01:00
parent 855c4bb754
commit bd32d1db78
No known key found for this signature in database
GPG Key ID: 54DC29234AB5D2C0
1 changed files with 2 additions and 3 deletions

View File

@ -12,6 +12,8 @@ check:
# Lint everything. # Lint everything.
lint: lint:
cargo +$(cat ./nightly-version) clippy --workspace --all-targets --all-features -- --deny warnings cargo +$(cat ./nightly-version) clippy --workspace --all-targets --all-features -- --deny warnings
# lint warnings get inhibited unless we use `--nocapture`
cargo test --quiet --workspace --doc -- --nocapture
# Run cargo fmt # Run cargo fmt
fmt: fmt:
@ -31,9 +33,6 @@ sane: lint
cargo test --quiet --workspace --all-targets > /dev/null || exit 1 cargo test --quiet --workspace --all-targets > /dev/null || exit 1
cargo test --quiet --workspace --all-targets --all-features > /dev/null || exit 1 cargo test --quiet --workspace --all-targets --all-features > /dev/null || exit 1
# doctests don't get run from workspace root with `cargo test`.
cargo test --quiet --workspace --doc || exit 1
# Make an attempt to catch feature gate problems in doctests # Make an attempt to catch feature gate problems in doctests
cargo test --manifest-path bitcoin/Cargo.toml --doc --no-default-features > /dev/null || exit 1 cargo test --manifest-path bitcoin/Cargo.toml --doc --no-default-features > /dev/null || exit 1