-
Notifications
You must be signed in to change notification settings - Fork 14k
Description
Right now, if your project has a certain set of lints it wants to use, it needs to repeat the #![deny(foo)] entries in every single crate of the project.
In the clippy project it has frequently been requested (rust-lang/rust-clippy#1313) that we add a clippy.toml file which would have entries for allowing, warning and denying lints, instead of requiring -A, -W or -D flags to the compiler.
I think this is something that should be solved on the rustc side. As a minimal version I propose to add a --lint-file=foo.toml or --lint-settings=foo.toml setting, which is default-filled by cargo by crawling up the directory tree and looking for a lints.toml or rustc.toml (or a green bikshed).
To reduce repeating the lint modifiers, I propose to use the keys allow, deny, warn and forbid of Vec<String> type:
deny = [
"foo",
"bar",
]Does this require an RFC?