Skip to content

Commit

Permalink
along long lines if they contain error msgs
Browse files Browse the repository at this point in the history
Rate limit · GitHub

Access has been restricted

You have triggered a rate limit.

Please wait a few minutes before you try again;
in some cases this may take up to an hour.

nikomatsakis committed Apr 17, 2012
1 parent f9eca21 commit 2b5ad25
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/etc/tidy.py
Original file line number Diff line number Diff line change
@@ -31,7 +31,10 @@ def report_err(s):
if line.endswith(" \n") or line.endswith("\t\n"):
report_err("trailing whitespace")
line_len = len(line)-2 if autocrlf else len(line)-1
if line_len > cols:

# Along long lines if they are part of an expected error message
# in a test, which is denoted with "//!":
if line_len > cols and "//!" not in line:
report_err("line longer than %d chars" % cols)
except UnicodeDecodeError, e:
report_err("UTF-8 decoding error " + str(e))

0 comments on commit 2b5ad25

Please sign in to comment.