Skip to content

Commit

Permalink
Auto merge of #4845 - flip1995:clippy_toml_deps, r=phansch
Browse files Browse the repository at this point in the history
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
  • Loading branch information
bors committed Nov 29, 2019
2 parents 4780ac0 + a61fd43 commit 350f3d6
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/driver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -318,10 +318,9 @@ pub fn main() {
};

// this check ensures that dependencies are built but not linted and the final
// crate is
// linted but not built
// crate is linted but not built
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 {
args.extend_from_slice(&["--cfg".to_owned(), r#"feature="cargo-clippy""#.to_owned()]);
Expand Down

0 comments on commit 350f3d6

Please sign in to comment.