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
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
fixintegration? if not, what would?rust-lang/rust-clippy#2087 is relevant to that last question
cc @ehuss
Edit: tracking the checklist in original post rather than below
cargo fix --clippyovercargo clippy-preview --fix(gonna gate the --clippy arg behind the unstable flag in the same wayclippy-previewis gated)implement wrapper for primary crate only logicunnecessarysupport using the wrapper for all local workspace crates when using theunnecessary--allflagcargo fixhave clippy override the fingerprint to force a run when using cargo fixunnecessary?