From 971feb618518d5b53dcdc43dcc873b5f7be3f88c Mon Sep 17 00:00:00 2001 From: binarycat Date: Sat, 5 Jul 2025 10:17:31 -0500 Subject: [PATCH] tidy: use --bless for tidy spellcheck instead of spellcheck:fix previous behavior was inconsistent with existing extra checks. --- src/tools/tidy/src/ext_tool_checks.rs | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/tools/tidy/src/ext_tool_checks.rs b/src/tools/tidy/src/ext_tool_checks.rs index 2904908fd436..f76403711b14 100644 --- a/src/tools/tidy/src/ext_tool_checks.rs +++ b/src/tools/tidy/src/ext_tool_checks.rs @@ -72,8 +72,7 @@ fn check_impl( let shell_lint = lint_args.contains(&"shell:lint") || shell_all; let cpp_all = lint_args.contains(&"cpp"); let cpp_fmt = lint_args.contains(&"cpp:fmt") || cpp_all; - let spellcheck_all = lint_args.contains(&"spellcheck"); - let spellcheck_fix = lint_args.contains(&"spellcheck:fix"); + let spellcheck = lint_args.contains(&"spellcheck"); let mut py_path = None; @@ -226,7 +225,7 @@ fn check_impl( shellcheck_runner(&merge_args(&cfg_args, &file_args_shc))?; } - if spellcheck_all || spellcheck_fix { + if spellcheck { let config_path = root_path.join("typos.toml"); // sync target files with .github/workflows/spellcheck.yml let mut args = vec![ @@ -238,11 +237,11 @@ fn check_impl( "./src/librustdoc", ]; - if spellcheck_all { - eprintln!("spellcheck files"); - } else if spellcheck_fix { + if bless { eprintln!("spellcheck files and fix"); args.push("--write-changes"); + } else { + eprintln!("spellcheck files"); } spellcheck_runner(&args)?; }