]> git.lizzy.rs Git - rust.git/blobdiff - src/tools/clippy/tests/dogfood.rs
Rollup merge of #102514 - b-naber:binder-print-fixes, r=jackh726
[rust.git] / src / tools / clippy / tests / dogfood.rs
index fffc53603424ba831f52c94c14be81ed01af4b00..961525bbd9101dfbc6759f69ba3f05d7aa94e170 100644 (file)
@@ -74,18 +74,24 @@ fn run_clippy_for_package(project: &str, args: &[&str]) {
         .env("CARGO_INCREMENTAL", "0")
         .arg("clippy")
         .arg("--all-targets")
-        .arg("--all-features")
-        .arg("--")
-        .args(args)
-        .arg("-Cdebuginfo=0"); // disable debuginfo to generate less data in the target dir
+        .arg("--all-features");
+
+    if let Ok(dogfood_args) = std::env::var("__CLIPPY_DOGFOOD_ARGS") {
+        for arg in dogfood_args.split_whitespace() {
+            command.arg(arg);
+        }
+    }
+
+    command.arg("--").args(args);
+    command.arg("-Cdebuginfo=0"); // disable debuginfo to generate less data in the target dir
 
     if cfg!(feature = "internal") {
         // internal lints only exist if we build with the internal feature
-        command.args(&["-D", "clippy::internal"]);
+        command.args(["-D", "clippy::internal"]);
     } else {
         // running a clippy built without internal lints on the clippy source
         // that contains e.g. `allow(clippy::invalid_paths)`
-        command.args(&["-A", "unknown_lints"]);
+        command.args(["-A", "unknown_lints"]);
     }
 
     let output = command.output().unwrap();