-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
CLIPPY_FLAGS to pass options to clippy/ enable disable lints via env vars #5214
Comments
I'd say we should wait for rust-lang/cargo#7533 first |
I can't reproduce the This would be great news as it could help to solve the problem when Clippy does not re-run if flags passed after |
Yeah, looks like |
Can we close this issue now that |
I'm preparing a PR for the "no re-run" problem and I hit that error in the dogfood. I still have to debug it, could be a misuse on my side, but in the meantime I would keep this open. |
Right now, there is no way to globally enable/disable clippy lints on a system.
If we want to disable certain lint, we have to either modify the code and add
#[allow(clippy::foo)]
which is tedious, or we have to add-- -Aclippy::foo
to EVERY clippy invocation which is also tedious and not always easily done, especially if clippy is invoked by another tool.IMO the biggest problem is that we cannot use
RUSTFLAGS
for some reason:RUSTFLAGS="-Aclippy::needless_return" cargo clippy
will just throw errors:I would love to have something like
export CLIPPY_FLAGS="-A collapsible_if
that I just throw into my zshrc and stop worrying about that lint forever.The text was updated successfully, but these errors were encountered: