-
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
Overwriting group flags #3745
Comments
I think this is a bug on the rustc end, we don't do anything special for lint groups |
I haven't tested it, but this should then also not work correctly when using lint groups from rustc and activating a single lint in there? I'll try it out. |
I tried it with What about this issue then? Shall I close it? |
Open an issue on the rust side, feel free to link to it here and leave this open or closed as you wish. |
Thank you @Manishearth for taking the time to respond. I'll close this issue. |
Hello.
I'm working on a project that has several smaller Rust projects and wanted to add every possible lint or lint group to them so we know exactly what's still there to fix and know exactly when something bad is introduced. I should note that these smaller projects are not in a workspace.
Using the typical
deny(...)
for a group and thenallow(...)
another lint inside it is what I wanted to do initially, but also having rustc lints in that list quickly bloated it to about 45 lines. And managing this list in every small project is pain. So I ended up writing a small script that can be run from inside the CI and by developers alike without having to manually update alllib.rs
ormain.rs
files every time a new lint can bedeny(...)
'd.When running the script it turned out that all of the lints in groups that were on
deny
suddenly popped up again even though they wereallow
ed.For example:
cargo clippy -- --deny clippy::pedantic --allow clippy::similar_names
still triggers thesimilar_names
lint. Usingworks flawlessly.
This was tested with
clippy 0.0.212 (b2601be 2018-11-27)
and pretty much forces me to fill 4 lib.rs/main.rs files with about 45allow
anddeny
-s.Is there a reason a
allow
flag does not overwrite adeny
flag? If so, why?The text was updated successfully, but these errors were encountered: