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