You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
Empty and invalid paths (i.e. non-paths), e.g. x:::m.
Paths that do not start with a crate, e.g. x::m if x is not a crate.
Paths to an item that exists but is not a macro, e.g. x::m if m is not a macro.
Paths to items that do not exist, e.g. x::m if there is no m.
etc.
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).
The text was updated successfully, but these errors were encountered:
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:x:::m
.x::m
ifx
is not a crate.x::m
ifm
is not a macro.x::m
if there is nom
.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
allow
ed or somehow conditional compilation handled within the config file (#11433; of course, a workaround could be users generating the config file on the fly).The text was updated successfully, but these errors were encountered: