Mercurial > hg
comparison contrib/check-code.py @ 24453:65f1a29685ab
check-code: in C code, prevent space before closing parenthesis
author | Laurent Charignon <lcharignon@fb.com> |
---|---|
date | Tue, 24 Mar 2015 12:52:53 -0700 |
parents | 58682838f8f7 |
children | 1f9127c9239b |
comparison
equal
deleted
inserted
replaced
24452:7797fadac0e8 | 24453:65f1a29685ab |
---|---|
333 (r'(\S[ \t]+|^[ \t]+)\n', "trailing whitespace"), | 333 (r'(\S[ \t]+|^[ \t]+)\n', "trailing whitespace"), |
334 (r'.{81}', "line too long"), | 334 (r'.{81}', "line too long"), |
335 (r'(while|if|do|for)\(', "use space after while/if/do/for"), | 335 (r'(while|if|do|for)\(', "use space after while/if/do/for"), |
336 (r'return\(', "return is not a function"), | 336 (r'return\(', "return is not a function"), |
337 (r' ;', "no space before ;"), | 337 (r' ;', "no space before ;"), |
338 (r'[^;] \)', "no space before )"), | |
338 (r'[)][{]', "space between ) and {"), | 339 (r'[)][{]', "space between ) and {"), |
339 (r'\w+\* \w+', "use int *foo, not int* foo"), | 340 (r'\w+\* \w+', "use int *foo, not int* foo"), |
340 (r'\W\([^\)]+\) \w+', "use (int)foo, not (int) foo"), | 341 (r'\W\([^\)]+\) \w+', "use (int)foo, not (int) foo"), |
341 (r'\w+ (\+\+|--)', "use foo++, not foo ++"), | 342 (r'\w+ (\+\+|--)', "use foo++, not foo ++"), |
342 (r'\w,\w', "missing whitespace after ,"), | 343 (r'\w,\w', "missing whitespace after ,"), |