# HG changeset patch # User Matt Mackall # Date 1379532979 18000 # Node ID 22a70f31e3e9fff19381a998665908dfe30e646a # Parent 06badf7d10dc197cdcbeab6eb0c18d1957eebbe0 check-code: add bracket style check diff -r 06badf7d10dc -r 22a70f31e3e9 contrib/check-code.py --- a/contrib/check-code.py Sat Sep 14 11:22:34 2013 +0800 +++ b/contrib/check-code.py Wed Sep 18 14:36:19 2013 -0500 @@ -287,6 +287,7 @@ (r'(while|if|do|for)\(', "use space after while/if/do/for"), (r'return\(', "return is not a function"), (r' ;', "no space before ;"), + (r'[)][{]', "space between ) and {"), (r'\w+\* \w+', "use int *foo, not int* foo"), (r'\W\([^\)]+\) \w+', "use (int)foo, not (int) foo"), (r'\w+ (\+\+|--)', "use foo++, not foo ++"),