diff options
| author | Tobias Bucher <tobiasbucher5991@gmail.com> | 2024-06-11 19:34:53 +0200 |
|---|---|---|
| committer | Tobias Bucher <tobiasbucher5991@gmail.com> | 2024-06-12 17:51:18 +0200 |
| commit | 39c3b86eaa756cf3b8a8957abae7fd029196f90d (patch) | |
| tree | fb97a89d4b6f2aa57036e17a68f4315219caeeac /src | |
| parent | bbe9a9c20bac888efae2c7f033fb6cb3925a65b7 (diff) | |
| download | rust-39c3b86eaa756cf3b8a8957abae7fd029196f90d.tar.gz rust-39c3b86eaa756cf3b8a8957abae7fd029196f90d.zip | |
Add a `ignore-tidy-todo` to ignore the tidy TODO comment check
Diffstat (limited to 'src')
| -rw-r--r-- | src/tools/tidy/src/style.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/tools/tidy/src/style.rs b/src/tools/tidy/src/style.rs index 64cc2277620..2d3888ec75f 100644 --- a/src/tools/tidy/src/style.rs +++ b/src/tools/tidy/src/style.rs @@ -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", ) |
