check-code: move fixing up regexp into main procedure
authorFUJIWARA Katsunori <foozy@lares.dti.ne.jp>
Fri, 20 May 2016 09:47:35 +0900
changeset 29569 3d52e7c78a6b
parent 29568 7825f6154a65
child 29570 cbd240188e4e
check-code: move fixing up regexp into main procedure This patch makes an extra check pattern to be prepared by "_preparepats()" as similarly as existing patterns, if it is added to "checks" array before invocation of "main()" in check-code.py. This is a part of preparation for adding check-code.py extra checks by another python script in subsequent patch. This is also useful for SkeletonExtensionPlan. https://www.mercurial-scm.org/wiki/SkeletonExtensionPlan
contrib/check-code.py
--- a/contrib/check-code.py	Fri May 20 09:47:35 2016 +0900
+++ b/contrib/check-code.py	Fri May 20 09:47:35 2016 +0900
@@ -474,7 +474,6 @@
         filters = c[3]
         for i, flt in enumerate(filters):
             filters[i] = re.compile(flt[0]), flt[1]
-_preparepats()
 
 class norepeatlogger(object):
     def __init__(self):
@@ -644,6 +643,8 @@
     else:
         check = args
 
+    _preparepats()
+
     ret = 0
     for f in check:
         if not checkfile(f, maxerr=options.per_file, warnings=options.warnings,