From 2b5ad256f5e934a16cd3bf23624ec3ba69b6fa2f Mon Sep 17 00:00:00 2001 From: Niko Matsakis Date: Tue, 17 Apr 2012 08:39:41 -0700 Subject: [PATCH] along long lines if they contain error msgs --- src/etc/tidy.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/etc/tidy.py b/src/etc/tidy.py index ca57f686dbbdf..0948b5fb00c8d 100644 --- a/src/etc/tidy.py +++ b/src/etc/tidy.py @@ -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))