changeset 16413:1a420761fcb7

check-code: avoid false-positive on ++
author Matt Mackall <mpm@selenic.com>
date Thu, 12 Apr 2012 20:22:18 -0500
parents 1a10bee86e33
children e8d37b78acfb
files contrib/check-code.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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"),