mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-23 13:13:34 +00:00
White-list third-party
in conf files
This commit is contained in:
parent
c7db94aee6
commit
403c54ec5b
4 changed files with 16 additions and 0 deletions
|
@ -100,6 +100,10 @@ macro_rules! define_Conf {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
)+
|
)+
|
||||||
|
"third-party" => {
|
||||||
|
// for external tools such as clippy-service
|
||||||
|
return Ok(());
|
||||||
|
}
|
||||||
_ => {
|
_ => {
|
||||||
return Err(ConfError::UnknownKey(name));
|
return Err(ConfError::UnknownKey(name));
|
||||||
}
|
}
|
||||||
|
|
|
@ -1 +1,6 @@
|
||||||
|
# that one is an error
|
||||||
foobar = 42
|
foobar = 42
|
||||||
|
|
||||||
|
# that one is white-listed
|
||||||
|
[third-party]
|
||||||
|
clippy-feature = "nightly"
|
||||||
|
|
4
tests/run-pass/conf_unknown_key.rs
Normal file
4
tests/run-pass/conf_unknown_key.rs
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
#![feature(plugin)]
|
||||||
|
#![plugin(clippy(conf_file="./tests/run-pass/conf_unknown_key.toml"))]
|
||||||
|
|
||||||
|
fn main() {}
|
3
tests/run-pass/conf_unknown_key.toml
Normal file
3
tests/run-pass/conf_unknown_key.toml
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
# this is ignored by Clippy, but allowed for other tools like clippy-service
|
||||||
|
[third-party]
|
||||||
|
clippy-feature = "nightly"
|
Loading…
Reference in a new issue