mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-27 15:11:30 +00:00
Auto merge of #4845 - flip1995:clippy_toml_deps, r=phansch
Don't error on clippy.toml of dependencies Fixes #3874 Checking for `metadata` wasn't enough anymore. `--cap-lints allow` only appears when compiling deps though. changelog: none
This commit is contained in:
commit
350f3d6f5b
1 changed files with 2 additions and 3 deletions
|
@ -318,10 +318,9 @@ pub fn main() {
|
||||||
};
|
};
|
||||||
|
|
||||||
// this check ensures that dependencies are built but not linted and the final
|
// this check ensures that dependencies are built but not linted and the final
|
||||||
// crate is
|
// crate is linted but not built
|
||||||
// linted but not built
|
|
||||||
let clippy_enabled = env::var("CLIPPY_TESTS").map_or(false, |val| val == "true")
|
let clippy_enabled = env::var("CLIPPY_TESTS").map_or(false, |val| val == "true")
|
||||||
|| arg_value(&orig_args, "--emit", |val| val.split(',').any(|e| e == "metadata")).is_some();
|
|| arg_value(&orig_args, "--cap-lints", |val| val == "allow").is_none();
|
||||||
|
|
||||||
if clippy_enabled {
|
if clippy_enabled {
|
||||||
args.extend_from_slice(&["--cfg".to_owned(), r#"feature="cargo-clippy""#.to_owned()]);
|
args.extend_from_slice(&["--cfg".to_owned(), r#"feature="cargo-clippy""#.to_owned()]);
|
||||||
|
|
Loading…
Reference in a new issue