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```
This commit is contained in:
Trevor Gross 2025-07-10 03:23:57 -04:00 committed by GitHub
commit 58ec9db538
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 241 additions and 48 deletions

View file

@ -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

View file

@ -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",
},
];