# HG changeset patch # User Pierre-Yves David # Date 1407024293 25200 # Node ID 6fa40bd78bc871522ed44b550d8f3b98f920cd61 # Parent efd5b7eb3e6db822d7bc888c73e46b7318c96dee check-code: allow an escape pattern to be specified for testpattern Before this patch it was impossible to introduce a #no-xxx comment to disable a test pattern warning. diff -r efd5b7eb3e6d -r 6fa40bd78bc8 contrib/check-code.py --- a/contrib/check-code.py Sat Aug 02 17:01:55 2014 -0700 +++ b/contrib/check-code.py Sat Aug 02 17:04:53 2014 -0700 @@ -179,12 +179,14 @@ ] for i in [0, 1]: - for p, m in testpats[i]: + for tp in testpats[i]: + p = tp[0] + m = tp[1] if p.startswith(r'^'): p = r"^ [$>] (%s)" % p[1:] else: p = r"^ [$>] .*(%s)" % p - utestpats[i].append((p, m)) + utestpats[i].append((p, m) + tp[2:]) utestfilters = [ (r"<<(\S+)((.|\n)*?\n > \1)", rephere),