ci: add clippy lint gate, remove obsolete clippy dev-dependency#306
Open
allamiro wants to merge 1 commit into
Open
ci: add clippy lint gate, remove obsolete clippy dev-dependency#306allamiro wants to merge 1 commit into
allamiro wants to merge 1 commit into
Conversation
The clippy 0.0.302 crate is a years-old relic (clippy ships as a rustup component); cargo itself warns it is an invalid dependency. The new CI job gates on the bug-catching lint groups (correctness, suspicious); style lints are left for a dedicated cleanup.
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.
Fixes #291.
Changes
clippy = "0.0.302"from dev-dependencies — clippy has shipped as a rustup component for years and cargo warns it is an invalid dependency (missing a lib target). Lockfile updated accordingly.lintjob in the test workflow:cargo clippy --all-targets -- -D clippy::correctness -D clippy::suspicious.Why not
-D warnings/cargo fmt --check?The codebase currently has 22 clippy style warnings and ~170 rustfmt diffs. Fixing those touches nearly every file and would conflict with the open PR queue — better done as a dedicated cleanup afterwards, at which point the gate can be tightened. The chosen lint groups pass today and catch actual bugs, so the gate is meaningful immediately.
Testing
cargo test: 9/9 pass with the updated lockfileSummary by cubic
Add a CI lint job running
cargo clippy --all-targets -- -D clippy::correctness -D clippy::suspiciousto gate on bug-catching lints. Remove the obsoleteclippydev-dependency and pruneCargo.lock.Written for commit 4095d4e. Summary will update on new commits.