contrib/check-code.py
changeset 19745 22a70f31e3e9
parent 19732 1abd45e2553a
child 19793 6fb1b7728719
equal deleted inserted replaced
19744:06badf7d10dc 19745:22a70f31e3e9
   285     (r'(\S[ \t]+|^[ \t]+)\n', "trailing whitespace"),
   285     (r'(\S[ \t]+|^[ \t]+)\n', "trailing whitespace"),
   286     (r'.{81}', "line too long"),
   286     (r'.{81}', "line too long"),
   287     (r'(while|if|do|for)\(', "use space after while/if/do/for"),
   287     (r'(while|if|do|for)\(', "use space after while/if/do/for"),
   288     (r'return\(', "return is not a function"),
   288     (r'return\(', "return is not a function"),
   289     (r' ;', "no space before ;"),
   289     (r' ;', "no space before ;"),
       
   290     (r'[)][{]', "space between ) and {"),
   290     (r'\w+\* \w+', "use int *foo, not int* foo"),
   291     (r'\w+\* \w+', "use int *foo, not int* foo"),
   291     (r'\W\([^\)]+\) \w+', "use (int)foo, not (int) foo"),
   292     (r'\W\([^\)]+\) \w+', "use (int)foo, not (int) foo"),
   292     (r'\w+ (\+\+|--)', "use foo++, not foo ++"),
   293     (r'\w+ (\+\+|--)', "use foo++, not foo ++"),
   293     (r'\w,\w', "missing whitespace after ,"),
   294     (r'\w,\w', "missing whitespace after ,"),
   294     (r'^[^#]\w[+/*]\w', "missing whitespace in expression"),
   295     (r'^[^#]\w[+/*]\w', "missing whitespace in expression"),