##// END OF EJS Templates
contrib: change return value of file checking function of check-code.py...
FUJIWARA Katsunori -
r41990:519b2fae default
parent child Browse files
Show More
@@ -669,8 +669,9 b' def checkfile(f, logfunc=_defaultlogger.'
669 669 print("Skipping %s it has no-che?k-code (glob)" % f)
670 670 return "Skip" # skip checking this file
671 671
672 if not _checkfiledata(name, f, pre, filters, pats, context,
673 logfunc, maxerr, warnings, blame, debug, lineno):
672 fc = _checkfiledata(name, f, pre, filters, pats, context,
673 logfunc, maxerr, warnings, blame, debug, lineno)
674 if fc:
674 675 result = False
675 676
676 677 return result
@@ -695,13 +696,12 b' def _checkfiledata(name, f, filedata, fi'
695 696 :debug: whether debug information should be displayed
696 697 :lineno: whether lineno should be displayed at error reporting
697 698
698 return True if no error is found, False otherwise.
699 returns number of detected errors.
699 700 """
700 701 blamecache = context['blamecache']
701 702
702 703 fc = 0
703 704 pre = post = filedata
704 result = True
705 705
706 706 if True: # TODO: get rid of this redundant 'if' block
707 707 for p, r in filters:
@@ -760,7 +760,6 b' def _checkfiledata(name, f, filedata, fi'
760 760 bd = '%s@%s' % (bu, br)
761 761
762 762 errors.append((f, lineno and n + 1, l, msg, bd))
763 result = False
764 763
765 764 errors.sort()
766 765 for e in errors:
@@ -770,7 +769,7 b' def _checkfiledata(name, f, filedata, fi'
770 769 print(" (too many errors, giving up)")
771 770 break
772 771
773 return result
772 return fc
774 773
775 774 def main():
776 775 parser = optparse.OptionParser("%prog [options] [files | -]")
General Comments 0
You need to be logged in to leave comments. Login now