check-code: avoid false-positive on ++
authorMatt Mackall <mpm@selenic.com>
Thu, 12 Apr 2012 20:22:18 -0500
changeset 16413 1a420761fcb7
parent 16412 1a10bee86e33
child 16414 e8d37b78acfb
check-code: avoid false-positive on ++
contrib/check-code.py
--- a/contrib/check-code.py	Wed Apr 11 11:37:13 2012 +0200
+++ b/contrib/check-code.py	Thu Apr 12 20:22:18 2012 -0500
@@ -227,7 +227,7 @@
     (r' ;', "no space before ;"),
     (r'\w+\* \w+', "use int *foo, not int* foo"),
     (r'\([^\)]+\) \w+', "use (int)foo, not (int) foo"),
-    (r'\S+ (\+\+|--)', "use foo++, not foo ++"),
+    (r'\w+ (\+\+|--)', "use foo++, not foo ++"),
     (r'\w,\w', "missing whitespace after ,"),
     (r'^[^#]\w[+/*]\w', "missing whitespace in expression"),
     (r'^#\s+\w', "use #foo, not # foo"),