diff --git a/src/bootstrap/src/core/build_steps/test.rs b/src/bootstrap/src/core/build_steps/test.rs index ebbb569e9dbed..16220abddd0c8 100644 --- a/src/bootstrap/src/core/build_steps/test.rs +++ b/src/bootstrap/src/core/build_steps/test.rs @@ -1125,10 +1125,10 @@ impl Step for Tidy { if builder.config.cmd.bless() { cmd.arg("--bless"); } - if let Some(s) = - builder.config.cmd.extra_checks().or(builder.config.tidy_extra_checks.as_deref()) - { - cmd.arg(format!("--extra-checks={s}")); + let extra_checks = + builder.config.cmd.extra_checks().unwrap_or(builder.config.tidy_extra_checks.as_str()); + if !extra_checks.is_empty() { + cmd.arg(format!("--extra-checks={extra_checks}")); } let mut args = std::env::args_os(); if args.any(|arg| arg == OsStr::new("--")) { diff --git a/src/bootstrap/src/core/config/config.rs b/src/bootstrap/src/core/config/config.rs index 6e04f11542438..21d6fd405b551 100644 --- a/src/bootstrap/src/core/config/config.rs +++ b/src/bootstrap/src/core/config/config.rs @@ -299,7 +299,7 @@ pub struct Config { /// Whether to use the precompiled stage0 libtest with compiletest. pub compiletest_use_stage0_libtest: bool, /// Default value for `--extra-checks` - pub tidy_extra_checks: Option, + pub tidy_extra_checks: String, pub is_running_on_ci: bool, /// Cache for determining path modifications @@ -1014,7 +1014,8 @@ impl Config { optimized_compiler_builtins.unwrap_or(config.channel != "dev"); config.compiletest_diff_tool = compiletest_diff_tool; config.compiletest_use_stage0_libtest = compiletest_use_stage0_libtest.unwrap_or(true); - config.tidy_extra_checks = tidy_extra_checks; + config.tidy_extra_checks = tidy_extra_checks + .unwrap_or_else(|| "auto:js,auto:cpp,auto:py,auto:spellcheck".to_string()); let download_rustc = config.download_rustc_commit.is_some(); config.explicit_stage_from_cli = flags_stage.is_some();