##// END OF EJS Templates
check-code: Add a ``maxerr`` argument to the ``checkfile`` function...
Pierre-Yves David -
r10718:f18c37fd default
parent child Browse files
Show More
@@ -133,7 +133,7 b' checks = ['
133 133 ('test script', r'(.*/)?test-[^.~]*$', testfilters, testpats),
134 134 ('c', r'.*\.c$', cfilters, cpats),
135 135 ]
136 def checkfile(f):
136 def checkfile(f, maxerr=None):
137 137 """checks style and portability of a given file"""
138 138 for name, match, filters, pats in checks:
139 139 fc = 0
@@ -158,7 +158,7 b' def checkfile(f):'
158 158 print " %s" % msg
159 159 lc += 1
160 160 fc += 1
161 if fc == 15:
161 if maxerr is not None and fc >= maxerr:
162 162 print " (too many errors, giving up)"
163 163 break
164 164 break
@@ -171,4 +171,4 b' if __name__ == "__main__":'
171 171 check = sys.argv[1:]
172 172
173 173 for f in check:
174 checkfile(f)
174 checkfile(f, maxerr=15)
General Comments 0
You need to be logged in to leave comments. Login now