Mercurial > public > mercurial-scm > hg
diff contrib/check-code.py @ 12743:4c4aeaab2339
check-code: add 'no tab indent' check for unified tests
and fix the offending tests accordingly
author | Adrian Buehlmann <adrian@cadifra.com> |
---|---|
date | Sat, 16 Oct 2010 18:09:01 +0200 |
parents | 3acd5f7ab9d0 |
children | 614f0d8724ab |
line wrap: on
line diff
--- a/contrib/check-code.py Sun Oct 17 04:14:06 2010 +0200 +++ b/contrib/check-code.py Sat Oct 16 18:09:01 2010 +0200 @@ -72,6 +72,7 @@ ] uprefix = r"^ \$ " +uprefixc = r"^ > " utestpats = [ (uprefix + r'.*\|\s*sed', "use regex test output patterns instead of sed"), (uprefix + r'(true|exit 0)', "explicit zero exit unnecessary"), @@ -79,6 +80,7 @@ (uprefix + r'.*\|\| echo.*(fail|error)', "explicit exit code checks unnecessary"), (uprefix + r'set -e', "don't use set -e"), + (uprefixc + r'( *)\t', "don't use tabs to indent"), ] for p, m in testpats: