contrib/check-code.py
changeset 15457 1470f8b00694
parent 15389 3bece03bf3c6
child 15502 7917a104a285
equal deleted inserted replaced
15456:abcaaf51d568 15457:1470f8b00694
   129     (r'.{85}', "line too long"),
   129     (r'.{85}', "line too long"),
   130     (r' x+[xo][\'"]\n\s+[\'"]x', 'string join across lines with no space'),
   130     (r' x+[xo][\'"]\n\s+[\'"]x', 'string join across lines with no space'),
   131     (r'[^\n]\Z', "no trailing newline"),
   131     (r'[^\n]\Z', "no trailing newline"),
   132     (r'(\S[ \t]+|^[ \t]+)\n', "trailing whitespace"),
   132     (r'(\S[ \t]+|^[ \t]+)\n', "trailing whitespace"),
   133 #    (r'^\s+[^_ \n][^_. \n]+_[^_\n]+\s*=', "don't use underbars in identifiers"),
   133 #    (r'^\s+[^_ \n][^_. \n]+_[^_\n]+\s*=', "don't use underbars in identifiers"),
   134 #    (r'\w*[a-z][A-Z]\w*\s*=', "don't use camelcase in identifiers"),
   134     (r'^\s+(self\.)?[A-za-z][a-z0-9]+[A-Z]\w* = ',
       
   135      "don't use camelcase in identifiers"),
   135     (r'^\s*(if|while|def|class|except|try)\s[^[\n]*:\s*[^\\n]#\s]+',
   136     (r'^\s*(if|while|def|class|except|try)\s[^[\n]*:\s*[^\\n]#\s]+',
   136      "linebreak after :"),
   137      "linebreak after :"),
   137     (r'class\s[^( \n]+:', "old-style class, use class foo(object)"),
   138     (r'class\s[^( \n]+:', "old-style class, use class foo(object)"),
   138     (r'class\s[^( \n]+\(\):',
   139     (r'class\s[^( \n]+\(\):',
   139      "class foo() not available in Python 2.4, use class foo(object)"),
   140      "class foo() not available in Python 2.4, use class foo(object)"),