##// END OF EJS Templates
check-code: enforce strict spacing around assignment
timeless -
r27640:8d0a0916 default
parent child Browse files
Show More
@@ -127,6 +127,7 b' testpats = ['
127 127 (r'seq ', "don't use 'seq', use $TESTDIR/seq.py"),
128 128 (r'\butil\.Abort\b', "directly use error.Abort"),
129 129 (r'\|&', "don't use |&, use 2>&1"),
130 (r'\w = +\w', "only one space after = allowed"),
130 131 ],
131 132 # warnings
132 133 [
@@ -220,6 +221,7 b' pypats = ['
220 221 (r'(\w|\)),\w', "missing whitespace after ,"),
221 222 (r'(\w|\))[+/*\-<>]\w', "missing whitespace in expression"),
222 223 (r'^\s+(\w|\.)+=\w[^,()\n]*$', "missing whitespace in assignment"),
224 (r'\w\s=\s\s+\w', "gratuitous whitespace after ="),
223 225 (r'.{81}', "line too long"),
224 226 (r' x+[xo][\'"]\n\s+[\'"]x', 'string join across lines with no space'),
225 227 (r'[^\n]\Z', "no trailing newline"),
@@ -337,6 +339,7 b' cpats = ['
337 339 (r'\w+ (\+\+|--)', "use foo++, not foo ++"),
338 340 (r'\w,\w', "missing whitespace after ,"),
339 341 (r'^[^#]\w[+/*]\w', "missing whitespace in expression"),
342 (r'\w\s=\s\s+\w', "gratuitous whitespace after ="),
340 343 (r'^#\s+\w', "use #foo, not # foo"),
341 344 (r'[^\n]\Z', "no trailing newline"),
342 345 (r'^\s*#import\b', "use only #include in standard C code"),
General Comments 0
You need to be logged in to leave comments. Login now