From 7c0dfbc2b835e92170f2d3dc825250f07defedb6 Mon Sep 17 00:00:00 2001 From: Kriday Dave Date: Wed, 7 Oct 2026 03:32:16 +0530 Subject: [PATCH] ci: lint the test targets, which clippy currently skips cargo clippy -- -D warnings covers the lib and bin targets only, so the 843-line tests/cli.rs and every #[cfg(test)] block in src/ were unlinted, while cargo fmt --check at ci.yml:26 does walk them. Adding --all-targets closes that asymmetry. --locked matches the flag the test step already uses. The one warning that surfaced is fixed in the same change, since it would otherwise break the build: src/fabric.rs:234 assert_eq!(x, false) -> assert!(!x) Ran the new command on this tree. Clean, exit 0. --- .github/workflows/ci.yml | 2 +- src/fabric.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5c5c2e0..dc66e36 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,7 +26,7 @@ jobs: run: cargo fmt --check - name: Clippy - run: cargo clippy -- -D warnings + run: cargo clippy --all-targets --locked -- -D warnings - name: Tests run: cargo test --locked diff --git a/src/fabric.rs b/src/fabric.rs index ffaa555..8aac4d6 100644 --- a/src/fabric.rs +++ b/src/fabric.rs @@ -231,7 +231,7 @@ mod tests { }; fab.set_policy(&p).unwrap(); let loaded = fab.get_policy("myapp").unwrap(); - assert_eq!(loaded.require_check_strict, false); + assert!(!loaded.require_check_strict); assert_eq!(loaded.allowed_branches, vec!["main"]); let def = fab.get_policy("other").unwrap(); assert!(def.require_signed);