Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions src/tools/tidy/src/ext_tool_checks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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![
Expand All @@ -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)?;
}
Expand Down
Loading