Skip to content

Commit 2b5ad25

Browse files
committed
along long lines if they contain error msgs
1 parent f9eca21 commit 2b5ad25

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/etc/tidy.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,10 @@ def report_err(s):
3131
if line.endswith(" \n") or line.endswith("\t\n"):
3232
report_err("trailing whitespace")
3333
line_len = len(line)-2 if autocrlf else len(line)-1
34-
if line_len > cols:
34+
35+
# Along long lines if they are part of an expected error message
36+
# in a test, which is denoted with "//!":
37+
if line_len > cols and "//!" not in line:
3538
report_err("line longer than %d chars" % cols)
3639
except UnicodeDecodeError, e:
3740
report_err("UTF-8 decoding error " + str(e))

0 commit comments

Comments
 (0)