Closed
Description
See rust-lang/cargo#6664 (comment) for some context.
Currently cargo clippy
is a thin wrapper script around Cargo that invokes cargo check
with a RUSTC_WRAPPER: https://github.com/rust-lang/rust-clippy/blob/8dfabdf11c6cdaffd7c6e6552a6ead8d52c49b10/src/main.rs
It does some additional hacks to support the clippy dogfood test and passing down arguments.
We should move this into cargo proper, like rustc: Ideally it's just a copy of cargo check
that sets a different rustc executable (temporarily can be done by overriding RUSTC_WRAPPER, but the better solution probably involves modifying config.rustc()
https://github.com/rust-lang/cargo/blob/716b02cb4c7b75ce435eb06defa25bc2d725909c/src/cargo/util/config.rs#L194-L215
Steps:
- Add cargo clippy-preview to cargo Cargo clippy cargo#6759
- Make it work with dogfood tests Update dogfood tests to use cargo clippy-preview #4050
- Improve cargo integration, especially with cargo fix call clippy-driver directly rather than as a rustc_wrapper cargo#7006
- add better help Better help support in
clippy-driver
#4173 - Make cargo-clippy shell out to clippy-preview?
-
Perhaps make-Wlintname
work as a shortcut for-Wclippy::lintname
- rename and stabilize cargo clippy-preview
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment