comparison contrib/check-code.py @ 15873:a153a86a472c

tests: keep track of all check-code.py warnings
author Mads Kiilerich <mads@kiilerich.com>
date Wed, 11 Jan 2012 01:56:05 +0100
parents ec8a49c46d7e
children 2a1d97630f7f
comparison
equal deleted inserted replaced
15869:e5feebc1f3bb 15873:a153a86a472c
307 307
308 :f: filepath 308 :f: filepath
309 :logfunc: function used to report error 309 :logfunc: function used to report error
310 logfunc(filename, linenumber, linecontent, errormessage) 310 logfunc(filename, linenumber, linecontent, errormessage)
311 :maxerr: number of error to display before arborting. 311 :maxerr: number of error to display before arborting.
312 Set to None (default) to report all errors 312 Set to false (default) to report all errors
313 313
314 return True if no error is found, False otherwise. 314 return True if no error is found, False otherwise.
315 """ 315 """
316 blamecache = None 316 blamecache = None
317 result = True 317 result = True
390 390
391 errors.sort() 391 errors.sort()
392 for e in errors: 392 for e in errors:
393 logfunc(*e) 393 logfunc(*e)
394 fc += 1 394 fc += 1
395 if maxerr is not None and fc >= maxerr: 395 if maxerr and fc >= maxerr:
396 print " (too many errors, giving up)" 396 print " (too many errors, giving up)"
397 break 397 break
398 398
399 return result 399 return result
400 400