Repository navigation
chore(lint): make all-targets clippy pass and gate it in CI - #895
Merged
Merged
Conversation
Use shared test-only Clippy configuration, fix fixture and benchmark lints, and enforce all targets in the v3 lint workflow. Co-Authored-By: Codex (GPT-6) <noreply@openai.com>
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
CI's stable clippy is newer than the toolchain the cleanup was checked with and flags constant-size chunks_exact (as_chunks instead) and a reversed sort_by comparator (sort_by_key with Reverse). Same iteration and order. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01H2a7QjCHpikfsg5qwAV1p9
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.
cargo clippy --all-targets -- -D warningsfailed onv3with 4,345 diagnostics, almost all in tests, benches and examples. CI only linted the library and binary, so they had never been checked. This makes it pass and adds--all-targetsto the CI gate.What changes
clippy.tomlturns on clippy's supported test-only settings:allow-unwrap-in-tests,allow-expect-in-tests,allow-panic-in-testsandallow-indexing-slicing-in-tests. 72 integration-test crate roots get#![cfg(test)], so their helper functions count as test code.approx_constantusesstd::f64::consts, deprecated Criterionblack_boxbecomesstd::hint::black_box, and.err().expect()becomesexpect_err(). Every assertion still checks the same values.[workspace.lints.clippy]is unchanged and no production library or binary code changes. A probe confirmed that non-testunwrap/expect/panic/indexing are still errors.num-traits = "0.2"is added as a dev-dependency, for checked float conversions in the soak harness. It was already resolved transitively.lint.ymlnow runscargo clippy --all-targets --all-features -- -D warnings.Verification
cargo clippy --all-targets -- -D warningsand--all-targets --all-features: 4,345 / 4,645 errors before, 0 after.cargo clippy --all-features, and the browser and WASI target clippies: still pass.cargo test: 2,138 passed, 21 ignored, the same before and after.cargo fmt --check: passes.mainneeds the samelint.ymlchange as a separate PR, per the shared-CI rule.🤖 Generated with Claude Code
https://claude.ai/code/session_01H2a7QjCHpikfsg5qwAV1p9