-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
rust-lang/rust
#67885Description
When more than one -A, -D, or -W option in a clippy invocation refers to the same lint, either directly or indirectly, whichever one came last on the command line should win. The most important reason for this is so you can enable a category of warnings that's off by default, but then turn some of them back off again. For example, suppose src/demo.rs
is this:
pub fn demo() -> &'static str {
"παράδειγμα"
}
then this invocation should not complain about the non-ASCII characters in the string literal, but currently it does:
$ cargo clippy -- -W clippy::pedantic -A clippy::non-ascii-literal
warning: literal non-ASCII character detected
--> src/demo.rs:2:5
|
2 | "παράδειγμα"
| ^^^^^^^^^^^^
|
= note: `-W clippy::non-ascii-literal` implied by `-W clippy::pedantic`
...
One might also want to be able to do -D warnings -A clippy::something_specific
or -W clippy::all -D clippy::particular_bad_thing
.
Version information:
$ cargo clippy -V
clippy 0.0.212 (726176e 2019-04-18)
shenek and nthuemmelquite
Metadata
Metadata
Assignees
Labels
No labels