about summary refs log tree commit diff
path: root/src/bootstrap
diff options
context:
space:
mode:
authorTrevor Gross <t.gross35@gmail.com>2025-07-10 03:23:57 -0400
committerGitHub <noreply@github.com>2025-07-10 03:23:57 -0400
commit58ec9db538405fea4288ca2f532288d0376f73ea (patch)
tree94a15568766db6bd0494fdb7ee90f617fdc92a93 /src/bootstrap
parent9af7bdafb78df320cf1c5a97cffb97145c7c110e (diff)
parent1f80fd0f23405bd5d6061684eb2259dc92116f81 (diff)
downloadrust-58ec9db538405fea4288ca2f532288d0376f73ea.tar.gz
rust-58ec9db538405fea4288ca2f532288d0376f73ea.zip
Rollup merge of #143398 - lolbinarycat:tidy-extra-checks-auto, r=Kobzol
tidy: add support for `--extra-checks=auto:` feature

in preparation for rust-lang/rust#142924

also heavily refactored the parsing of the `--extra-checks` argument to warn about improper usage.

cc ```@GuillaumeGomez```

r? ```@Kobzol```
Diffstat (limited to 'src/bootstrap')
-rw-r--r--src/bootstrap/src/core/config/flags.rs5
-rw-r--r--src/bootstrap/src/utils/change_tracker.rs5
2 files changed, 9 insertions, 1 deletions
diff --git a/src/bootstrap/src/core/config/flags.rs b/src/bootstrap/src/core/config/flags.rs
index bfc06f90d4f..19e0d3413bb 100644
--- a/src/bootstrap/src/core/config/flags.rs
+++ b/src/bootstrap/src/core/config/flags.rs
@@ -383,7 +383,10 @@ pub enum Subcommand {
         bless: bool,
         #[arg(long)]
         /// comma-separated list of other files types to check (accepts py, py:lint,
-        /// py:fmt, shell, shell:lint, cpp, cpp:fmt, spellcheck, spellcheck:fix)
+        /// py:fmt, shell, shell:lint, cpp, cpp:fmt, spellcheck)
+        ///
+        /// Any argument can be prefixed with "auto:" to only run if
+        /// relevant files are modified (eg. "auto:py").
         extra_checks: Option<String>,
         #[arg(long)]
         /// rerun tests even if the inputs are unchanged
diff --git a/src/bootstrap/src/utils/change_tracker.rs b/src/bootstrap/src/utils/change_tracker.rs
index 424f211c7d4..29591edc9cc 100644
--- a/src/bootstrap/src/utils/change_tracker.rs
+++ b/src/bootstrap/src/utils/change_tracker.rs
@@ -461,4 +461,9 @@ pub const CONFIG_CHANGE_HISTORY: &[ChangeInfo] = &[
         severity: ChangeSeverity::Warning,
         summary: "`download-rustc` has been temporarily disabled for the library profile due to implementation bugs (see #142505).",
     },
+    ChangeInfo {
+        change_id: 143398,
+        severity: ChangeSeverity::Info,
+        summary: "The --extra-checks flag now supports prefixing any check with `auto:` to only run it if relevant files are modified",
+    },
 ];