changeset 22101:6fa40bd78bc8

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.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Sat, 02 Aug 2014 17:04:53 -0700
parents efd5b7eb3e6d
children fff8e1cec90f
files contrib/check-code.py
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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),