Mercurial > public > mercurial-scm > hg-stable
diff contrib/check-code.py @ 19872:681f7b9213a4
check-code: check for spaces around = for named parameters
author | Mads Kiilerich <madski@unity3d.com> |
---|---|
date | Thu, 03 Oct 2013 14:50:47 +0200 |
parents | 6fb1b7728719 |
children | b3de50b0c7aa |
line wrap: on
line diff
--- a/contrib/check-code.py Thu Oct 03 14:50:47 2013 +0200 +++ b/contrib/check-code.py Thu Oct 03 14:50:47 2013 +0200 @@ -226,6 +226,8 @@ "missing whitespace around operator"), (r'[^^+=*/!<>&| %-](\s=|=\s)[^= ]', "wrong whitespace around ="), + (r'\([^()]*( =[^=]|[^<>!=]= )', + "no whitespace around = for named parameters"), (r'raise Exception', "don't raise generic exceptions"), (r'raise [^,(]+, (\([^\)]+\)|[^,\(\)]+)$', "don't use old-style two-argument raise, use Exception(message)"),