What is wrong
lint-check-rust — the clippy gate every branch must pass, and part of check-rust — is:
[tasks.lint-check-rust]
run = "cargo clippy --workspace -- $CLIPPY_FLAGS"
mise.toml:135-136. There is no --all-targets, so cargo lints lib and bin targets only. Every integration test, every #[cfg(test)] mod tests, every bench and every example in the workspace is invisible to clippy and to the -D warnings in CLIPPY_FLAGS (mise.toml:40).
This is a gate hole rather than a nit: the test tree is a large and growing share of the workspace (capsule-core alone carries 783 tests, capsule-e2e is entirely test code), and none of it is linted. Defects of this class accumulate unseen and nothing ever reports them.
Evidence
One instance found while working on an unrelated change: capsule-core/src/library/receipts.rs:96 imports HybridSignature and HybridVerifyingKey into its test module and uses neither.
warning: unused imports: `HybridSignature` and `HybridVerifyingKey`
--> capsule-core/src/library/receipts.rs:96:31
It has been there since f508bf1a. mise run lint-check-rust passes on it; cargo check --workspace --all-targets reports it.
Size of the backlog this will surface
Measured on test/e2e-cases-409 at acaf9c11, running the gate's own CLIPPY_FLAGS with --all-targets added (and -D warnings dropped so the run does not stop at the first crate):
- 111 warnings across 32 files — 70 in
capsule-core, 8 in capsule-server, 1 in capsule-sdk, the rest in test binaries.
- The largest groups are cosmetic and mechanically fixable: 26 ×
unreadable_literal (timestamps like 1720000000), 6 × large_stack_arrays, 4 × case_sensitive_file_extension_comparisons, 3 × unnecessary_lazy_evaluations, 3 × needless_update, plus one-offs (unused_imports, dead_code, unreachable_pub, float_cmp, useless_vec, assertions_on_constants, …).
clippy::unwrap_used and expect_used are not part of the backlog: clippy.toml:6-7 already sets allow-unwrap-in-tests / allow-expect-in-tests, so the flag costs nothing there. Verified — a run with -D clippy::unwrap_used --all-targets reports zero unwrap() denials.
Why this is its own piece of work
Adding --all-targets to the task turns 111 currently-invisible warnings into a red gate on every branch at once. Doing it inside an unrelated pull request would bury that PR's own delta under a cross-workspace cleanup, so it needs to be a change of its own: fix the backlog and flip the flag in one commit series, ideally crate by crate.
Two things to decide while doing it:
- Whether to also widen the two
--features ffi clippy invocations (mise.toml:314-315), which have the same omission.
- Whether some pedantic lints should be relaxed for test targets specifically (e.g.
large_stack_arrays on a fixture buffer is not the same defect it is in library code). clippy.toml already takes that position for unwrap/expect; the same reasoning may apply to one or two others rather than editing fixtures to please a lint.
Reproduce
mise run lint-check-rust # passes
cargo check --workspace --all-targets # reports capsule-core/src/library/receipts.rs:96
Found by the W-E2E lane of the #409 run; referenced from PR #463's ## Unresolved review notes, which deliberately did not fix it.
What is wrong
lint-check-rust— the clippy gate every branch must pass, and part ofcheck-rust— is:mise.toml:135-136. There is no--all-targets, so cargo lints lib and bin targets only. Every integration test, every#[cfg(test)] mod tests, every bench and every example in the workspace is invisible to clippy and to the-D warningsinCLIPPY_FLAGS(mise.toml:40).This is a gate hole rather than a nit: the test tree is a large and growing share of the workspace (
capsule-corealone carries 783 tests,capsule-e2eis entirely test code), and none of it is linted. Defects of this class accumulate unseen and nothing ever reports them.Evidence
One instance found while working on an unrelated change:
capsule-core/src/library/receipts.rs:96importsHybridSignatureandHybridVerifyingKeyinto its test module and uses neither.It has been there since
f508bf1a.mise run lint-check-rustpasses on it;cargo check --workspace --all-targetsreports it.Size of the backlog this will surface
Measured on
test/e2e-cases-409atacaf9c11, running the gate's ownCLIPPY_FLAGSwith--all-targetsadded (and-D warningsdropped so the run does not stop at the first crate):capsule-core, 8 incapsule-server, 1 incapsule-sdk, the rest in test binaries.unreadable_literal(timestamps like1720000000), 6 ×large_stack_arrays, 4 ×case_sensitive_file_extension_comparisons, 3 ×unnecessary_lazy_evaluations, 3 ×needless_update, plus one-offs (unused_imports,dead_code,unreachable_pub,float_cmp,useless_vec,assertions_on_constants, …).clippy::unwrap_usedandexpect_usedare not part of the backlog:clippy.toml:6-7already setsallow-unwrap-in-tests/allow-expect-in-tests, so the flag costs nothing there. Verified — a run with-D clippy::unwrap_used --all-targetsreports zerounwrap()denials.Why this is its own piece of work
Adding
--all-targetsto the task turns 111 currently-invisible warnings into a red gate on every branch at once. Doing it inside an unrelated pull request would bury that PR's own delta under a cross-workspace cleanup, so it needs to be a change of its own: fix the backlog and flip the flag in one commit series, ideally crate by crate.Two things to decide while doing it:
--features fficlippy invocations (mise.toml:314-315), which have the same omission.large_stack_arrayson a fixture buffer is not the same defect it is in library code).clippy.tomlalready takes that position forunwrap/expect; the same reasoning may apply to one or two others rather than editing fixtures to please a lint.Reproduce
Found by the W-E2E lane of the #409 run; referenced from PR #463's
## Unresolved review notes, which deliberately did not fix it.