Mercurial > public > mercurial-scm > hg
comparison contrib/check-code.py @ 17346:2944a6d35158
check-code: fix check for trailing whitespace on empty lines
It seems like the intention with c7d23b4ca4ba was to catch lines with only
one whitespace too.
author | Mads Kiilerich <mads@kiilerich.com> |
---|---|
date | Wed, 08 Aug 2012 18:10:30 +0200 |
parents | 4f8054d3171b |
children | 2da47de36b6f |
comparison
equal
deleted
inserted
replaced
17345:4f8054d3171b | 17346:2944a6d35158 |
---|---|
89 ] | 89 ] |
90 | 90 |
91 uprefix = r"^ \$ " | 91 uprefix = r"^ \$ " |
92 utestpats = [ | 92 utestpats = [ |
93 [ | 93 [ |
94 (r'^(\S| \$ ).*(\S[ \t]+|^[ \t]+)\n', "trailing whitespace on non-output"), | 94 (r'^(\S.*|| \$ .*)[ \t]\n', "trailing whitespace on non-output"), |
95 (uprefix + r'.*\|\s*sed[^|>\n]*\n', | 95 (uprefix + r'.*\|\s*sed[^|>\n]*\n', |
96 "use regex test output patterns instead of sed"), | 96 "use regex test output patterns instead of sed"), |
97 (uprefix + r'(true|exit 0)', "explicit zero exit unnecessary"), | 97 (uprefix + r'(true|exit 0)', "explicit zero exit unnecessary"), |
98 (uprefix + r'.*(?<!\[)\$\?', "explicit exit code checks unnecessary"), | 98 (uprefix + r'.*(?<!\[)\$\?', "explicit exit code checks unnecessary"), |
99 (uprefix + r'.*\|\| echo.*(fail|error)', | 99 (uprefix + r'.*\|\| echo.*(fail|error)', |