Add cargo-shear to lint checks - #22
Conversation
nothingmuch
left a comment
There was a problem hiding this comment.
utACK.
validate commits has an EXPECT-FAIL thing you can use to validate that this work: make a new commit with [EXPECT-FAIL: cargo-shear] in the title, cargo add an unnecessary dep, and validate-commits will ensure that the corresponding flake check fails.
i don't yet have infrastructure for this, the plan was to have these as commits that branch off the commit that introduces the flake check, and then maintain a "check-fixtures" branch or something like that which octo-merges those. then in the CI job, the octo merge can be used to find those commits, and each could be rebased on top of GITHUB_REF to ensure that the flake check has not regressed. for now i have been testing these locally where i've added them.
feel free to make this into a new issue if interested
Detect unused Rust dependencies with cargo-shear.
The check runs as part of the Nix lint suite and the tool is available in the development shell for local use.