##// END OF EJS Templates
check-code: import some pylint checks
Matt Mackall -
r10412:5326800d default
parent child Browse files
Show More
@@ -60,7 +60,7 b' testfilters = ['
60
60
61 pypats = [
61 pypats = [
62 (r'^\s*\t', "don't use tabs"),
62 (r'^\s*\t', "don't use tabs"),
63 (r'(\S\s+|^\s+)\n', "trailing whitespace"),
63 (r'\S;\s*\n', "semicolon"),
64 (r'\w,\w', "missing whitespace after ,"),
64 (r'\w,\w', "missing whitespace after ,"),
65 (r'\w[+/*\-<>]\w', "missing whitespace in expression"),
65 (r'\w[+/*\-<>]\w', "missing whitespace in expression"),
66 (r'^\s+\w+=\w+[^,)]$', "missing whitespace in assignment"),
66 (r'^\s+\w+=\w+[^,)]$', "missing whitespace in assignment"),
@@ -73,6 +73,7 b' pypats = ['
73 (r'class\s[^(]:', "old-style class, use class foo(object)"),
73 (r'class\s[^(]:', "old-style class, use class foo(object)"),
74 (r'^\s+del\(', "del isn't a function"),
74 (r'^\s+del\(', "del isn't a function"),
75 (r'^\s+except\(', "except isn't a function"),
75 (r'^\s+except\(', "except isn't a function"),
76 (r',]', "unneeded trailing ',' in list"),
76 # (r'class\s[A-Z][^\(]*\((?!Exception)',
77 # (r'class\s[A-Z][^\(]*\((?!Exception)',
77 # "don't capitalize non-exception classes"),
78 # "don't capitalize non-exception classes"),
78 # (r'in range\(', "use xrange"),
79 # (r'in range\(', "use xrange"),
@@ -83,7 +84,10 b' pypats = ['
83 (r'if\s.*\selse', "if ... else form not available in Python 2.4"),
84 (r'if\s.*\selse', "if ... else form not available in Python 2.4"),
84 (r'([\(\[]\s\S)|(\S\s[\)\]])', "gratuitous whitespace in () or []"),
85 (r'([\(\[]\s\S)|(\S\s[\)\]])', "gratuitous whitespace in () or []"),
85 # (r'\s\s=', "gratuitous whitespace before ="),
86 # (r'\s\s=', "gratuitous whitespace before ="),
86 (r'\S(\+=|-=|!=|<>|<=|>=|<<=|>>=)\S', "missing whitespace around operator")
87 (r'[^>< ](\+=|-=|!=|<>|<=|>=|<<=|>>=)\S', "missing whitespace around operator"),
88 (r'[^>< ](\+=|-=|!=|<>|<=|>=|<<=|>>=)\s', "missing whitespace around operator"),
89 (r'\s(\+=|-=|!=|<>|<=|>=|<<=|>>=)\S', "missing whitespace around operator"),
90 (r'[^+=*!<>&| -](\s=|=\s)[^= ]', "wrong whitespace around ="),
87 ]
91 ]
88
92
89 pyfilters = [
93 pyfilters = [
General Comments 0
You need to be logged in to leave comments. Login now