Skip to content

Commit b128ceb

Browse files
committed
tidy: allow arbitrary spaces between // and NOTE
`make tidy` now detects `//NOTE`, `// NOTE`, etc. This also removes the extra empty line emitted after each warning. Fixes #6060
1 parent 69a237e commit b128ceb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/etc/tidy.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,9 @@ def do_license_check(name, contents):
4949
report_err("FIXME without issue number")
5050
if line.find("TODO") != -1:
5151
report_err("TODO is deprecated; use FIXME")
52-
idx = line.find("// NOTE")
53-
if idx != -1:
54-
report_warn("NOTE" + line[idx + len("// NOTE"):])
52+
match = re.match(r'^.*//\s*(NOTE.*)$', line)
53+
if match:
54+
report_warn(match.group(1))
5555
if (line.find('\t') != -1 and
5656
fileinput.filename().find("Makefile") == -1):
5757
report_err("tab character")

0 commit comments

Comments
 (0)