Diagnostic for unexpected paths in configuration file · Issue #11432 · rust-lang/rust-clippy (original) (raw)

It would be nice if Clippy would emit a diagnostic for unexpected paths in the configuration file (e.g. in lints like disallowed_macros). For instance:

Otherwise, it is easy to make mistakes in the configuration file that will lead to no linting from Clippy. #[expect], expected-to-warn tests and similar approaches on the user's side can alleviate this, but it is best to offer it out of the box.

Some of the cases above may be undesirable in some cases (e.g. conditional compilation may make a macro disappear completely in some builds, as well as all its callers), but it may be still worth to have in many cases, if it can be allowed or somehow conditional compilation handled within the config file (#11433; of course, a workaround could be users generating the config file on the fly).