White-list third-party in conf files

This commit is contained in:
mcarton 2016-03-06 14:40:25 +01:00
parent c7db94aee6
commit 403c54ec5b
4 changed files with 16 additions and 0 deletions

View file

@ -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));
} }

View file

@ -1 +1,6 @@
# that one is an error
foobar = 42 foobar = 42
# that one is white-listed
[third-party]
clippy-feature = "nightly"

View file

@ -0,0 +1,4 @@
#![feature(plugin)]
#![plugin(clippy(conf_file="./tests/run-pass/conf_unknown_key.toml"))]
fn main() {}

View file

@ -0,0 +1,3 @@
# this is ignored by Clippy, but allowed for other tools like clippy-service
[third-party]
clippy-feature = "nightly"