check-code: make casting style check more precise

This commit is contained in:
Matt Mackall 2013-09-17 18:13:54 -05:00
parent 87385443b0
commit 5f16d1c838

View File

@ -288,7 +288,7 @@ cpats = [
(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"),