-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Description
Description
Hi,
Awsome tool that help me to be proeficient in Rust.
I am trying to use some of the new lint such as clippy::cognitive_complexity.
I see it can be configured by cognitive-complexity-threshold.
To my understanding, some lints can be tuned and they are listed here: Lint Configuration Options.
Unless I missunderstood, the only way to set those configurations is in a in a TOML file named clippy.toml or .clippy.toml.
I like to set all my lint configuration in my lib.rs/main.rs in the attributes #![allow/warn/deny/forbid(...)] at the beginnig of the file.
It lets me see a nice overview of all my lints settings.
Is it possible for the configurable lints to have their config inlined in the attribute so we won't need an extra clippy.toml file ?
I imagined something like:
#![warn(clippy::<lints>(<config1>=<value1>, <config2>=<value2>, ...))]
Example with clippy::cognitive_complexity:
// # lib.rs
//! My demo library.
// rustc lints
#![forbid(unsafe_code)]
#![deny(non_ascii_idents, unreachable_pub)]
#
Version
No response
Additional Labels
C-enhancement