Skip to content

Commit 39c3b86

Browse files
committed
Add a ignore-tidy-todo to ignore the tidy TODO comment check
1 parent bbe9a9c commit 39c3b86

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/tools/tidy/src/style.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -444,7 +444,9 @@ pub fn check(path: &Path, bad: &mut bool) {
444444
suppressible_tidy_err!(err, skip_cr, "CR character");
445445
}
446446
if filename != "style.rs" {
447-
if trimmed.contains("TODO") {
447+
// Allow using TODO in diagnostic suggestions by marking the
448+
// relevant line with `// ignore-tidy-todo`.
449+
if trimmed.contains("TODO") && !trimmed.contains("ignore-tidy-todo") {
448450
err(
449451
"TODO is used for tasks that should be done before merging a PR; If you want to leave a message in the codebase use FIXME",
450452
)

0 commit comments

Comments
 (0)