# HG changeset patch # User Pierre-Yves David # Date 2014-08-03 00:04:53 # 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 --git a/contrib/check-code.py b/contrib/check-code.py --- a/contrib/check-code.py +++ b/contrib/check-code.py @@ -179,12 +179,14 @@ utestpats = [ ] 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),