changeset 19745:22a70f31e3e9

check-code: add bracket style check
author Matt Mackall <mpm@selenic.com>
date Wed, 18 Sep 2013 14:36:19 -0500
parents 06badf7d10dc
children 9ad7dd9574a9
files contrib/check-code.py
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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 ++"),