diff options
| author | Niko Matsakis <niko@alum.mit.edu> | 2012-04-17 08:39:41 -0700 |
|---|---|---|
| committer | Niko Matsakis <niko@alum.mit.edu> | 2012-04-17 12:02:36 -0700 |
| commit | 2b5ad256f5e934a16cd3bf23624ec3ba69b6fa2f (patch) | |
| tree | 5f53838a2c75683f47aa45bddcea4fa6d83503b7 /src | |
| parent | f9eca218e170b6440fd2dee0086b72c2780e3eec (diff) | |
| download | rust-2b5ad256f5e934a16cd3bf23624ec3ba69b6fa2f.tar.gz rust-2b5ad256f5e934a16cd3bf23624ec3ba69b6fa2f.zip | |
along long lines if they contain error msgs
Diffstat (limited to 'src')
| -rw-r--r-- | src/etc/tidy.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/etc/tidy.py b/src/etc/tidy.py index ca57f686dbb..0948b5fb00c 100644 --- a/src/etc/tidy.py +++ b/src/etc/tidy.py @@ -31,7 +31,10 @@ try: 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)) |
