Mercurial > hg-stable
changeset 14005:bb391e0515ba
check-code: warn about naked except clauses
author | Idan Kamara <idankk86@gmail.com> |
---|---|
date | Sat, 23 Apr 2011 00:52:21 +0300 |
parents | 97ed99d1f419 |
children | a395575691a6 |
files | contrib/check-code.py |
diffstat | 1 files changed, 1 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/contrib/check-code.py Sat Apr 23 00:51:25 2011 +0300 +++ b/contrib/check-code.py Sat Apr 23 00:52:21 2011 +0300 @@ -150,6 +150,7 @@ (r'[^+=*!<>&| -](\s=|=\s)[^= ]', "wrong whitespace around ="), (r'raise Exception', "don't raise generic exceptions"), + (r'^\s*except:$', "warning: naked except clause"), (r'ui\.(status|progress|write|note|warn)\([\'\"]x', "warning: unwrapped ui message"), (r' is\s+(not\s+)?["\'0-9-]', "object comparison with literal"),