# HG changeset patch # User Laurent Charignon # Date 2015-03-24 19:52:53 # Node ID 65f1a29685abfb9f9bc8207d9da1775ec74c05f3 # Parent 7797fadac0e8ca1677ebdddeef3b407c043a705f check-code: in C code, prevent space before closing parenthesis diff --git a/contrib/check-code.py b/contrib/check-code.py --- a/contrib/check-code.py +++ b/contrib/check-code.py @@ -335,6 +335,7 @@ cpats = [ (r'(while|if|do|for)\(', "use space after while/if/do/for"), (r'return\(', "return is not a function"), (r' ;', "no space before ;"), + (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"),