-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Description
As part of our ongoing effort in rust-lang/rust-clippy#3837 to move clippy up into cargo so we can integrate it with fix and maybe other features that @Manishearth can add we're thinking the next step is to tweek clippy-preview so that it calls clippy-driver directly rather than treating it like a rustc wrapper.
When we looked into making it so that clippy-driver can be called as rustc instead of as a rustc wrapper, we realized it really doesn't do anything when its being a wrapper other than remove the rustc argument from the args list. So we should already be good to go on that front.
I'd like to implement this feature myself but manish and I don't know cargo well enough to know the proper way to go about it and manish recommended I ask @alexcrichton and @killercup for ideas on how to go about doing it.
Some additional questions from manish
- can this be done easily?
- would this help
fix
integration? if not, what would? - can we make this work such that build scripts still get the original RUSTC ?
rust-lang/rust-clippy#2087 is relevant to that last question
cc @ehuss
Edit: tracking the checklist in original post rather than below
- implement
cargo fix --clippy
overcargo clippy-preview --fix
(gonna gate the --clippy arg behind the unstable flag in the same wayclippy-preview
is gated) -
implement wrapper for primary crate only logicunnecessary-
support using the wrapper for all local workspace crates when using theunnecessary--all
flag
-
- implement clippy argument passthrough for
cargo fix
-
have clippy override the fingerprint to force a run when using cargo fixunnecessary? - add a test for cargo fixing a clippy lint, @Manishearth what is a good stable clippy lint to use?
- move clippy is available test from cache_message.rs to somewhere more clippy centric, along with above new test.