Skip to content
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
Closed

Use cargo clippy instead of the clippy plugin #1709

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

Comments

@oli-obk
Copy link
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
Copy link
Contributor Author

oli-obk commented May 24, 2018

Citing @sgrif in rust-lang/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
Copy link
Member

Was fixed by #1789

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants