Add a ignore-tidy-todo
to ignore the tidy TODO comment check
This commit is contained in:
parent
bbe9a9c20b
commit
39c3b86eaa
1 changed files with 3 additions and 1 deletions
|
@ -444,7 +444,9 @@ pub fn check(path: &Path, bad: &mut bool) {
|
|||
suppressible_tidy_err!(err, skip_cr, "CR character");
|
||||
}
|
||||
if filename != "style.rs" {
|
||||
if trimmed.contains("TODO") {
|
||||
// Allow using TODO in diagnostic suggestions by marking the
|
||||
// relevant line with `// ignore-tidy-todo`.
|
||||
if trimmed.contains("TODO") && !trimmed.contains("ignore-tidy-todo") {
|
||||
err(
|
||||
"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",
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue