Mercurial > public > mercurial-scm > hg-stable
diff contrib/check-code.py @ 12770:614f0d8724ab
check-code: find trailing whitespace
author | Martin Geisler <mg@lazybytes.net> |
---|---|
date | Wed, 20 Oct 2010 10:13:04 +0200 |
parents | 4c4aeaab2339 |
children | c7d23b4ca4ba |
line wrap: on
line diff
--- a/contrib/check-code.py Wed Oct 20 10:07:38 2010 +0200 +++ b/contrib/check-code.py Wed Oct 20 10:13:04 2010 +0200 @@ -110,6 +110,7 @@ (r'.{85}', "line too long"), (r'.{81}', "warning: line over 80 characters"), (r'[^\n]\Z', "no trailing newline"), + (r'(\S\s+|^\s+)\n', "trailing whitespace"), # (r'^\s+[^_ ][^_. ]+_[^_]+\s*=', "don't use underbars in identifiers"), # (r'\w*[a-z][A-Z]\w*\s*=', "don't use camelcase in identifiers"), (r'^\s*(if|while|def|class|except|try)\s[^[]*:\s*[^\]#\s]+',