about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorEtienne Millon <me@emillon.org>2013-07-23 21:07:51 +0200
committerEtienne Millon <me@emillon.org>2013-07-23 21:34:02 +0200
commitb128ceb16127ec9c817595aaa64c025b9e5ed12e (patch)
tree558ddf9d6a7584ee2a836fba3b85fabacaa302c6 /src
parent69a237ed7b40221c0f0bf8dc3774fddc3832f62d (diff)
downloadrust-b128ceb16127ec9c817595aaa64c025b9e5ed12e.tar.gz
rust-b128ceb16127ec9c817595aaa64c025b9e5ed12e.zip
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
Diffstat (limited to 'src')
-rw-r--r--src/etc/tidy.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/etc/tidy.py b/src/etc/tidy.py
index 06fcb5cb945..4815bc601f6 100644
--- a/src/etc/tidy.py
+++ b/src/etc/tidy.py
@@ -49,9 +49,9 @@ try:
                     report_err("FIXME without issue number")
             if line.find("TODO") != -1:
                 report_err("TODO is deprecated; use FIXME")
-            idx = line.find("// NOTE")
-            if idx != -1:
-                report_warn("NOTE" + line[idx + len("// NOTE"):])
+            match = re.match(r'^.*//\s*(NOTE.*)$', line)
+            if match:
+                report_warn(match.group(1))
         if (line.find('\t') != -1 and
             fileinput.filename().find("Makefile") == -1):
             report_err("tab character")