Closed
Description
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:
error[E0602]: unknown lint: `clippy::needless_return`
|
= note: requested on the command line with `-A clippy::needless_return`
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.