[PATCH 3 of 3 V4] test_code: in C code, prevent space before closing parenthese

Laurent Charignon lcharignon at fb.com
Tue Mar 24 15:48:55 CDT 2015


# HG changeset patch
# User Laurent Charignon <lcharignon at fb.com>
# Date 1427226773 25200
#      Tue Mar 24 12:52:53 2015 -0700
# Node ID f10b6515428db9de1f1dbfa1fa747d815d9b95cc
# Parent  b425123efec6b39be5b426e67766b4bbd5361369
test_code: in C code, prevent space before closing parenthese

diff --git a/contrib/check-code.py b/contrib/check-code.py
--- a/contrib/check-code.py
+++ b/contrib/check-code.py
@@ -334,6 +334,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'[^;] \)', "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"),


More information about the Mercurial-devel mailing list