ci: enforce the lint bar the project already declares - #146
Merged
ApiliumDevTeam merged 3 commits intoJul 30, 2026
Conversation
CLAUDE.md defines `make lint` as `cargo clippy --workspace --all-targets -- -D warnings`. CI ran `cargo clippy -p aingle_minimal --features rest -- -W clippy::all`: one member of seventeen, the library target only, and warnings that failed nothing. It reported green throughout. Behind it: a benchmark that had not compiled in months, assertions that compared unsigned counters against zero and so passed no matter what the code did, and a `flatten()` over `io::Lines` that spins forever on a repeated read error. `--all-targets` is what covers benches and integration tests, and is the only reason the dead benchmark surfaced. `Format Check` was separately red on main, so the aggregate `CI Success` gate has been failing for some time; `cargo fmt --all` here makes it pass and the widened clippy keeps it honest. Note the lints were an onion: with `-D warnings` a failing crate stops everything downstream from being linted at all, so the count grew from 24 to 54 as each layer was cleared. It took four passes to reach a clean run — worth knowing before trusting a single measurement. The three lints that are decisions rather than cleanup carry `#[allow(...)]` with the full reasoning at the site: two `clamp` substitutions that change NaN behaviour, and a public `from_str` that shadows the trait method. Removing each attribute is the definition of done for that decision.
…d dev `pull_request: branches: [main, dev]` meant a PR onto any other branch ran no checks at all. A stack of dependent PRs therefore had no CI until each was retargeted — which is after the review, not before it. Found by building such a stack: three of its five PRs showed no checks whatsoever, and nothing about the interface said why.
`clippy::question_mark` is new in 1.97. Nobody touched this code; the toolchain moved under it. Which is the whole argument for pinning: this repository installs `dtolnay/rust-toolchain@stable`, so the gate added in this PR can go red from a compiler release with no commit behind it. Verified by installing 1.97.0 locally — clippy, rustfmt and the tests are all clean under the exact toolchain the runner used, which 1.96 could not have told me.
This was referenced Jul 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Second of the stack. Base is #145; retargets to
devautomatically once that merges.The gap
CLAUDE.mddeclares--workspace-p aingle_minimal--all-targets-D warnings-W clippy::allOne member of seventeen, warn-only. It reported green the whole time 54 lints accumulated. Nobody was negligent — the gate everyone believed was shut was never fitted.
--all-targetsis load-bearing, not thoroughness for its own sake: it is what covers benches and integration tests, and the only reason a benchmark that had not compiled in months surfaced at all.Format Checkwas already redSeparately, and for some time — so the aggregate
CI Successgate has been failing onmain.cargo fmt --allhere makes it pass, and the widened clippy keeps it honest.A step I wrote and then removed
I added a "verify clippy really compiled every member" step and failed three times to make it work — once for a missing
jq, twice for paths two processes did not share. Each time it reported success because it had read nothing, which is precisely the failure it existed to catch. It also duplicates what--workspace -D warningsalready does: a member that will not build makes the step exit non-zero.Removed, with the reasoning left in the file. Shipping a verifier that cannot verify is worse than not having one.
Three
#[allow]remainTwo
clampsubstitutions that change NaN behaviour and one publicfrom_strthat shadows the trait method. Each carries its full reasoning at the site. #147 and #148 remove all three — after those, no#[allow]from this series is left anywhere.Verification
cargo clippy --workspace --all-targets -- -D warningsexit 0 ·cargo fmt --all --checkexit 0 · 2242 tests green.Not yet validated on the runner: CI only triggers on
main,devand PRs against them. This PR is the first time it runs.