Mercurial > hg-stable
changeset 16234:a6941d7033fa
check-code: check for % inside _()
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Thu, 08 Mar 2012 15:59:44 -0600 |
parents | 3f79b110c4f0 |
children | eb39bbda167b |
files | contrib/check-code.py |
diffstat | 1 files changed, 2 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/contrib/check-code.py Thu Mar 08 15:59:41 2012 -0600 +++ b/contrib/check-code.py Thu Mar 08 15:59:44 2012 -0600 @@ -122,6 +122,8 @@ (r'\.has_key\b', "dict.has_key is not available in Python 3+"), (r'^\s*\t', "don't use tabs"), (r'\S;\s*\n', "semicolon"), + (r'[^_]_\("[^"]+"\s*%', "don't use % inside _()"), + (r"[^_]_\('[^']+'\s*%", "don't use % inside _()"), (r'\w,\w', "missing whitespace after ,"), (r'\w[+/*\-<>]\w', "missing whitespace in expression"), (r'^\s+\w+=\w+[^,)\n]$', "missing whitespace in assignment"),