Skip to content

Commit 980a521

Browse files
committed
add tidy warning for "tidy-ignore"
Fixes #130984. Tidy now warns on seeing the typo "tidy-ignore-{CHECK}" (it's actually "ignore-tidy").
1 parent 48a426e commit 980a521

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/tools/tidy/src/style.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -474,6 +474,9 @@ pub fn check(path: &Path, bad: &mut bool) {
474474
suppressible_tidy_err!(err, skip_cr, "CR character");
475475
}
476476
if !is_this_file {
477+
if line.contains("tidy-ignore") {
478+
err("use ignore-tidy-[check], not tidy-ignore-[check]");
479+
}
477480
// Allow using TODO in diagnostic suggestions by marking the
478481
// relevant line with `// ignore-tidy-todo`.
479482
if trimmed.contains("TODO") && !trimmed.contains("ignore-tidy-todo") {

0 commit comments

Comments
 (0)