comparison contrib/check-code.py @ 16683:525fdb738975

cleanup: eradicate long lines
author Brodie Rao <brodie@sf.io>
date Sat, 12 May 2012 15:54:54 +0200
parents 775a8d33e6f0
children 1751d96d324f
comparison
equal deleted inserted replaced
16676:654b9e1966f7 16683:525fdb738975
137 r'((?:\n|\1\s.*\n)+?)\1finally:', 'no try/except/finally in Py2.4'), 137 r'((?:\n|\1\s.*\n)+?)\1finally:', 'no try/except/finally in Py2.4'),
138 (r'.{85}', "line too long"), 138 (r'.{85}', "line too long"),
139 (r' x+[xo][\'"]\n\s+[\'"]x', 'string join across lines with no space'), 139 (r' x+[xo][\'"]\n\s+[\'"]x', 'string join across lines with no space'),
140 (r'[^\n]\Z', "no trailing newline"), 140 (r'[^\n]\Z', "no trailing newline"),
141 (r'(\S[ \t]+|^[ \t]+)\n', "trailing whitespace"), 141 (r'(\S[ \t]+|^[ \t]+)\n', "trailing whitespace"),
142 # (r'^\s+[^_ \n][^_. \n]+_[^_\n]+\s*=', "don't use underbars in identifiers"), 142 # (r'^\s+[^_ \n][^_. \n]+_[^_\n]+\s*=',
143 # "don't use underbars in identifiers"),
143 (r'^\s+(self\.)?[A-za-z][a-z0-9]+[A-Z]\w* = ', 144 (r'^\s+(self\.)?[A-za-z][a-z0-9]+[A-Z]\w* = ',
144 "don't use camelcase in identifiers"), 145 "don't use camelcase in identifiers"),
145 (r'^\s*(if|while|def|class|except|try)\s[^[\n]*:\s*[^\\n]#\s]+', 146 (r'^\s*(if|while|def|class|except|try)\s[^[\n]*:\s*[^\\n]#\s]+',
146 "linebreak after :"), 147 "linebreak after :"),
147 (r'class\s[^( \n]+:', "old-style class, use class foo(object)"), 148 (r'class\s[^( \n]+:', "old-style class, use class foo(object)"),