diff options
| author | bors <bors@rust-lang.org> | 2022-05-09 19:55:37 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-05-09 19:55:37 +0000 |
| commit | 77effb7bb2667a71dd9db8514cd20bbfc2c6f241 (patch) | |
| tree | f4dd92482383618600f53a4ccc2366e4376145a5 | |
| parent | aa033440da1215a6955fa89c2f71593143144b92 (diff) | |
| parent | 6edf0b4f3613c59cac2401c35b1b6218fd518623 (diff) | |
| download | rust-77effb7bb2667a71dd9db8514cd20bbfc2c6f241.tar.gz rust-77effb7bb2667a71dd9db8514cd20bbfc2c6f241.zip | |
Auto merge of #8809 - Alexendoo:metadata-collection-expect, r=xFrednet
Ignore unfulfilled_lint_expectations in metadata collection r? `@xFrednet` When metadata collection is enabled the regular early/late pass registrations are skipped, which the `#[expect()]`s were no fan of: https://github.com/rust-lang/rust-clippy/runs/6356675328?check_suite_focus=true changelog: none
| -rw-r--r-- | tests/dogfood.rs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/dogfood.rs b/tests/dogfood.rs index eb97d1933d5..9da80518ce9 100644 --- a/tests/dogfood.rs +++ b/tests/dogfood.rs @@ -21,7 +21,7 @@ fn dogfood_clippy() { // "" is the root package for package in &["", "clippy_dev", "clippy_lints", "clippy_utils", "rustc_tools_util"] { - run_clippy_for_package(package); + run_clippy_for_package(package, &[]); } } @@ -38,7 +38,7 @@ fn run_metadata_collection_lint() { // Run collection as is std::env::set_var("ENABLE_METADATA_COLLECTION", "1"); - run_clippy_for_package("clippy_lints"); + run_clippy_for_package("clippy_lints", &["-A", "unfulfilled_lint_expectations"]); // Check if cargo caching got in the way if let Ok(file) = File::open(metadata_output_path) { @@ -61,10 +61,10 @@ fn run_metadata_collection_lint() { .unwrap(); // Running the collection again - run_clippy_for_package("clippy_lints"); + run_clippy_for_package("clippy_lints", &["-A", "unfulfilled_lint_expectations"]); } -fn run_clippy_for_package(project: &str) { +fn run_clippy_for_package(project: &str, args: &[&str]) { let root_dir = PathBuf::from(env!("CARGO_MANIFEST_DIR")); let mut command = Command::new(&*test_utils::CARGO_CLIPPY_PATH); @@ -76,6 +76,7 @@ fn run_clippy_for_package(project: &str) { .arg("--all-targets") .arg("--all-features") .arg("--") + .args(args) .args(&["-D", "clippy::all"]) .args(&["-D", "clippy::pedantic"]) .arg("-Cdebuginfo=0"); // disable debuginfo to generate less data in the target dir |
