diff --git a/src/conf.rs b/src/conf.rs index 0ceede3b5..93caa1edc 100644 --- a/src/conf.rs +++ b/src/conf.rs @@ -100,6 +100,10 @@ macro_rules! define_Conf { } }, )+ + "third-party" => { + // for external tools such as clippy-service + return Ok(()); + } _ => { return Err(ConfError::UnknownKey(name)); } diff --git a/tests/compile-fail/conf_unknown_key.toml b/tests/compile-fail/conf_unknown_key.toml index df298ea78..554b87cc5 100644 --- a/tests/compile-fail/conf_unknown_key.toml +++ b/tests/compile-fail/conf_unknown_key.toml @@ -1 +1,6 @@ +# that one is an error foobar = 42 + +# that one is white-listed +[third-party] +clippy-feature = "nightly" diff --git a/tests/run-pass/conf_unknown_key.rs b/tests/run-pass/conf_unknown_key.rs new file mode 100644 index 000000000..bb186d476 --- /dev/null +++ b/tests/run-pass/conf_unknown_key.rs @@ -0,0 +1,4 @@ +#![feature(plugin)] +#![plugin(clippy(conf_file="./tests/run-pass/conf_unknown_key.toml"))] + +fn main() {} diff --git a/tests/run-pass/conf_unknown_key.toml b/tests/run-pass/conf_unknown_key.toml new file mode 100644 index 000000000..9f87de20b --- /dev/null +++ b/tests/run-pass/conf_unknown_key.toml @@ -0,0 +1,3 @@ +# this is ignored by Clippy, but allowed for other tools like clippy-service +[third-party] +clippy-feature = "nightly"