comparison contrib/check-code.py @ 29517:f1fdd7e7d434

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.
author Augie Fackler <augie@google.com>
date Tue, 12 Jul 2016 15:34:17 -0400
parents 0c741fd6158a
children 57106f357cd1
comparison
equal deleted inserted replaced
29516:e5c61e745cd7 29517:f1fdd7e7d434
222 p = r"^ [$>] .*(%s)" % p 222 p = r"^ [$>] .*(%s)" % p
223 utestpats[i].append((p, m) + tp[2:]) 223 utestpats[i].append((p, m) + tp[2:])
224 224
225 utestfilters = [ 225 utestfilters = [
226 (r"<<(\S+)((.|\n)*?\n > \1)", rephere), 226 (r"<<(\S+)((.|\n)*?\n > \1)", rephere),
227 (r"( *)(#([^\n]*\S)?)", repcomment), 227 (r"( +)(#([^\n]*\S)?)", repcomment),
228 ] 228 ]
229 229
230 pypats = [ 230 pypats = [
231 [ 231 [
232 (r'^\s*def\s*\w+\s*\(.*,\s*\(', 232 (r'^\s*def\s*\w+\s*\(.*,\s*\(',