Skip to content

Commit

Permalink
tidy: allow arbitrary spaces between // and NOTE
Browse files Browse the repository at this point in the history
`make tidy` now detects `//NOTE`, `//  NOTE`, etc.
This also removes the extra empty line emitted after each warning.

Fixes #6060
  • Loading branch information
emillon committed Jul 23, 2013
1 parent 69a237e commit b128ceb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/etc/tidy.py
Expand Up @@ -49,9 +49,9 @@ def do_license_check(name, contents):
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")
Expand Down

5 comments on commit b128ceb

@bors
Copy link
Contributor

@bors bors commented on b128ceb Jul 24, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

saw approval from pcwalton
at emillon@b128ceb

@bors
Copy link
Contributor

@bors bors commented on b128ceb Jul 24, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merging emillon/rust/issue-6060 = b128ceb into auto

@bors
Copy link
Contributor

@bors bors commented on b128ceb Jul 24, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

emillon/rust/issue-6060 = b128ceb merged ok, testing candidate = 4a726f0

@bors
Copy link
Contributor

@bors bors commented on b128ceb Jul 25, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fast-forwarding master to auto = 4a726f0

Please sign in to comment.