Mercurial > public > mercurial-scm > hg-stable
diff 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 |
line wrap: on
line diff
--- a/contrib/check-code.py Wed Aug 08 18:10:16 2012 +0200 +++ b/contrib/check-code.py Wed Aug 08 18:10:30 2012 +0200 @@ -91,7 +91,7 @@ uprefix = r"^ \$ " utestpats = [ [ - (r'^(\S| \$ ).*(\S[ \t]+|^[ \t]+)\n', "trailing whitespace on non-output"), + (r'^(\S.*|| \$ .*)[ \t]\n', "trailing whitespace on non-output"), (uprefix + r'.*\|\s*sed[^|>\n]*\n', "use regex test output patterns instead of sed"), (uprefix + r'(true|exit 0)', "explicit zero exit unnecessary"),