check-code: make casting style check more precise
authorMatt Mackall <mpm@selenic.com>
Tue, 17 Sep 2013 18:13:54 -0500
changeset 19731 436a3f728375
parent 19730 d184bae667e4
child 19732 1abd45e2553a
check-code: make casting style check more precise
contrib/check-code.py
--- a/contrib/check-code.py	Tue Sep 10 19:49:34 2013 -0700
+++ b/contrib/check-code.py	Tue Sep 17 18:13:54 2013 -0500
@@ -288,7 +288,7 @@
     (r'return\(', "return is not a function"),
     (r' ;', "no space before ;"),
     (r'\w+\* \w+', "use int *foo, not int* foo"),
-    (r'\([^\)]+\) \w+', "use (int)foo, not (int) foo"),
+    (r'\W\([^\)]+\) \w+', "use (int)foo, not (int) foo"),
     (r'\w+ (\+\+|--)', "use foo++, not foo ++"),
     (r'\w,\w', "missing whitespace after ,"),
     (r'^[^#]\w[+/*]\w', "missing whitespace in expression"),