contrib/check-code.py
branchstable
changeset 15296 4b71c17caeb8
parent 15284 ebeac9c41456
child 15334 24856af7237c
equal deleted inserted replaced
15295:bd9405551ad4 15296:4b71c17caeb8
   124     (r'\w[+/*\-<>]\w', "missing whitespace in expression"),
   124     (r'\w[+/*\-<>]\w', "missing whitespace in expression"),
   125     (r'^\s+\w+=\w+[^,)\n]$', "missing whitespace in assignment"),
   125     (r'^\s+\w+=\w+[^,)\n]$', "missing whitespace in assignment"),
   126     (r'(?m)(\s+)try:\n((?:\n|\1\s.*\n)+?)\1except.*?:\n'
   126     (r'(?m)(\s+)try:\n((?:\n|\1\s.*\n)+?)\1except.*?:\n'
   127      r'((?:\n|\1\s.*\n)+?)\1finally:', 'no try/except/finally in Py2.4'),
   127      r'((?:\n|\1\s.*\n)+?)\1finally:', 'no try/except/finally in Py2.4'),
   128     (r'.{85}', "line too long"),
   128     (r'.{85}', "line too long"),
       
   129     (r'(?m) x+[xo][\'"]\n\s+[\'"]x', 'string join across lines with no space'),
   129     (r'[^\n]\Z', "no trailing newline"),
   130     (r'[^\n]\Z', "no trailing newline"),
   130     (r'(\S[ \t]+|^[ \t]+)\n', "trailing whitespace"),
   131     (r'(\S[ \t]+|^[ \t]+)\n', "trailing whitespace"),
   131 #    (r'^\s+[^_ \n][^_. \n]+_[^_\n]+\s*=', "don't use underbars in identifiers"),
   132 #    (r'^\s+[^_ \n][^_. \n]+_[^_\n]+\s*=', "don't use underbars in identifiers"),
   132 #    (r'\w*[a-z][A-Z]\w*\s*=', "don't use camelcase in identifiers"),
   133 #    (r'\w*[a-z][A-Z]\w*\s*=', "don't use camelcase in identifiers"),
   133     (r'^\s*(if|while|def|class|except|try)\s[^[\n]*:\s*[^\\n]#\s]+',
   134     (r'^\s*(if|while|def|class|except|try)\s[^[\n]*:\s*[^\\n]#\s]+',