check-code: only treat a # as a line in a t-test if it has a space before it
authorAugie Fackler <augie@google.com>
Tue, 12 Jul 2016 15:34:17 -0400
changeset 29517 f1fdd7e7d434
parent 29516 e5c61e745cd7
child 29518 348b2b9da703
check-code: only treat a # as a line in a t-test if it has a space before it Prior to this, check-code wouldn't notice things like (glob) annotations or similar in a test if they were after a # anywhere in the line. This resolves a defect in a future change, and also exposed a couple of small spots that needed some attention.
contrib/check-code.py
--- a/contrib/check-code.py	Tue Jul 12 15:41:38 2016 -0400
+++ b/contrib/check-code.py	Tue Jul 12 15:34:17 2016 -0400
@@ -224,7 +224,7 @@
 
 utestfilters = [
     (r"<<(\S+)((.|\n)*?\n  > \1)", rephere),
-    (r"( *)(#([^\n]*\S)?)", repcomment),
+    (r"( +)(#([^\n]*\S)?)", repcomment),
 ]
 
 pypats = [