check-code: add bracket style check
authorMatt Mackall <mpm@selenic.com>
Wed, 18 Sep 2013 14:36:19 -0500
changeset 19745 22a70f31e3e9
parent 19744 06badf7d10dc
child 19746 9ad7dd9574a9
check-code: add bracket style check
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 ++"),