# HG changeset patch # User FUJIWARA Katsunori # Date 1463705255 -32400 # Node ID 3d52e7c78a6ba99188abc947d2e85c30a9e57662 # Parent 7825f6154a650ff3e2378e2481f155fcdb1129bc 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 diff -r 7825f6154a65 -r 3d52e7c78a6b 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,