New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use `cargo clippy` instead of the clippy plugin #1709

Closed
oli-obk opened this Issue May 20, 2018 · 2 comments

Comments

Projects
None yet
2 participants
@oli-obk
Contributor

oli-obk commented May 20, 2018

We're planning on removing the clippy plugin interface, because rustc will remove it someday anyway. All that is required on your end is to remove the clippy feature and replace all cfgs that depend on it with the cargo-clippy feature which is automatically enabled by cargo clippy.

So you can then use cargo clippy instead of cargo build --features=clippy. Note that cargo clippy requires a cargo install clippy first.

@oli-obk

This comment has been minimized.

Contributor

oli-obk commented May 24, 2018

Citing @sgrif in rust-lang-nursery/rust-clippy#2712 (comment)

cargo clippy is a separate command that requires recompiling all the crates again (adding minutes to the feedback cycle), and that I have to remember to run in the first place. Running it as a separate step makes sense for CI, but hurts the work flow for local development.

That is a serious downside. But I think I have a solution. Do a cargo install clippy and set RUSTC_WRAPPER to clippy-driver (e.g. via an .env file) or change the appropriate setting in .cargo/config to clippy-driver. This should replace all compilation with clippy. It might require some adjustments on our side, but technically cargo check should then "just work"^TM

edit: We will find a solution to the rebuilding problem prior to removing the plugin interface (unless rustc removes it first that is of course).

@weiznich

This comment has been minimized.

Contributor

weiznich commented Sep 20, 2018

Was fixed by #1789

@weiznich weiznich closed this Sep 20, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment