From bd32d1db78b2412d6838c7b783e49ecd5cfa9d80 Mon Sep 17 00:00:00 2001 From: "Jamil Lambert, PhD" Date: Fri, 20 Sep 2024 15:24:50 +0100 Subject: [PATCH] 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`. --- justfile | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/justfile b/justfile index 962dcbf17..ce7af6170 100644 --- a/justfile +++ b/justfile @@ -12,6 +12,8 @@ check: # Lint everything. lint: 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 fmt: @@ -31,9 +33,6 @@ sane: lint cargo test --quiet --workspace --all-targets > /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 cargo test --manifest-path bitcoin/Cargo.toml --doc --no-default-features > /dev/null || exit 1