-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
--cap-lints
ignored by clippy --fix
#9703
Comments
If Clippy is not enabled, the arguments passed to Clippy are not forwarded to Lines 346 to 351 in 5b09d4e
This includes It probably would break things, because then we would also forward lint level flags to rustc, when compiling/checking dependencies. Playing around with this a bit more, I don't think that this is the issue though. I think the issue is in how |
Interesting. I'm not well versed in the I think at least warning ignored arguments would make sense |
There were several issues: - `--fix` was ignored as part of rust-lang#9461 - `--filter` in conjunction to `--fix` was broken due to rust-lang#9703 After `lintcheck --fix` is used, crates will be re-extracted since their content has been modified
There were several issues: - `--fix` was ignored as part of rust-lang#9461 - `--filter` in conjunction to `--fix` was broken due to rust-lang#9703 After `lintcheck --fix` is used, crates will be re-extracted since their content has been modified
There were several issues: - `--fix` was ignored as part of rust-lang#9461 - `--filter` in conjunction to `--fix` was broken due to rust-lang#9703 After `lintcheck --fix` is used, crates will be re-extracted since their content has been modified
There were several issues: - `--fix` was ignored as part of rust-lang#9461 - `--filter` in conjunction to `--fix` was broken due to rust-lang#9703 After `lintcheck --fix` is used, crates will be re-extracted since their content has been modified
Summary
While the
--cap-lints
flag is correctly taken into account when usingcargo clippy
, it is ignored when usingcargo clippy --fix
.I'm not sure if the unexpected behaviour comes from the clippy driver or from
rustfix
, but passing the flags directly usingRUSTFLAGS
work as intended.Reproducer
I tried this code:
running:
cargo clippy --fix -- --cap-lints=allow
I expected to see this happen:
Nothing, same behaviour as for
RUSTFLAGS="--cap-lints=allow" cargo clippy --fix
Instead, this happened:
Suggestions were applied
Version
Additional Labels
No response
The text was updated successfully, but these errors were encountered: