Mercurial > public > mercurial-scm > hg
comparison contrib/check-code.py @ 20870:6500a2eebee8
merge with stable
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Tue, 01 Apr 2014 15:11:19 -0500 |
parents | 131f7fe06e9e 9658a79968c6 |
children | e8ef59b351c3 |
comparison
equal
deleted
inserted
replaced
20864:9a75d2559cff | 20870:6500a2eebee8 |
---|---|
205 'dict-from-generator'), | 205 'dict-from-generator'), |
206 (r'\.has_key\b', "dict.has_key is not available in Python 3+"), | 206 (r'\.has_key\b', "dict.has_key is not available in Python 3+"), |
207 (r'\s<>\s', '<> operator is not available in Python 3+, use !='), | 207 (r'\s<>\s', '<> operator is not available in Python 3+, use !='), |
208 (r'^\s*\t', "don't use tabs"), | 208 (r'^\s*\t', "don't use tabs"), |
209 (r'\S;\s*\n', "semicolon"), | 209 (r'\S;\s*\n', "semicolon"), |
210 (r'[^_]_\("[^"]+"\s*%', "don't use % inside _()"), | 210 (r'[^_]_\((?:"[^"]+"[ \t\n+]*)+%', "don't use % inside _()"), |
211 (r"[^_]_\('[^']+'\s*%", "don't use % inside _()"), | 211 (r"[^_]_\((?:'[^']+'[ \t\n+]*)+%", "don't use % inside _()"), |
212 (r'(\w|\)),\w', "missing whitespace after ,"), | 212 (r'(\w|\)),\w', "missing whitespace after ,"), |
213 (r'(\w|\))[+/*\-<>]\w', "missing whitespace in expression"), | 213 (r'(\w|\))[+/*\-<>]\w', "missing whitespace in expression"), |
214 (r'^\s+(\w|\.)+=\w[^,()\n]*$', "missing whitespace in assignment"), | 214 (r'^\s+(\w|\.)+=\w[^,()\n]*$', "missing whitespace in assignment"), |
215 (r'(\s+)try:\n((?:\n|\1\s.*\n)+?)\1except.*?:\n' | 215 (r'(\s+)try:\n((?:\n|\1\s.*\n)+?)\1except.*?:\n' |
216 r'((?:\n|\1\s.*\n)+?)\1finally:', 'no try/except/finally in Python 2.4'), | 216 r'((?:\n|\1\s.*\n)+?)\1finally:', 'no try/except/finally in Python 2.4'), |