Mercurial > public > mercurial-scm > hg-stable
diff contrib/check-code.py @ 16497:c326fe884daa stable
tests: avoid tab indent on all kinds of lines of sh commands
author | Mads Kiilerich <mads@kiilerich.com> |
---|---|
date | Mon, 23 Apr 2012 01:56:48 +0200 |
parents | abbabbbe4ec2 |
children | 7f76c97361e0 |
line wrap: on
line diff
--- a/contrib/check-code.py Mon Apr 23 01:56:48 2012 +0200 +++ b/contrib/check-code.py Mon Apr 23 01:56:48 2012 +0200 @@ -76,6 +76,7 @@ (r'if\s*!', "don't use '!' to negate exit status"), (r'/dev/u?random', "don't use entropy, use /dev/zero"), (r'do\s*true;\s*done', "don't use true as loop body, use sleep 0"), + (r'^( *)\t', "don't use tabs to indent"), ], # warnings [] @@ -87,7 +88,6 @@ ] uprefix = r"^ \$ " -uprefixc = r"^ > " utestpats = [ [ (r'^(\S| $ ).*(\S[ \t]+|^[ \t]+)\n', "trailing whitespace on non-output"), @@ -98,7 +98,6 @@ "explicit exit code checks unnecessary"), (uprefix + r'set -e', "don't use set -e"), (uprefix + r'\s', "don't indent commands, use > for continued lines"), - (uprefixc + r'( *)\t', "don't use tabs to indent"), ], # warnings []