| OLD | NEW |
| 1 # Copyright (C) 2009 Google Inc. All rights reserved. | 1 # Copyright (C) 2009 Google Inc. All rights reserved. |
| 2 # Copyright (C) 2010 Chris Jerdonek (chris.jerdonek@gmail.com) | 2 # Copyright (C) 2010 Chris Jerdonek (chris.jerdonek@gmail.com) |
| 3 # Copyright (C) 2010 ProFUSION embedded systems | 3 # Copyright (C) 2010 ProFUSION embedded systems |
| 4 # | 4 # |
| 5 # Redistribution and use in source and binary forms, with or without | 5 # Redistribution and use in source and binary forms, with or without |
| 6 # modification, are permitted provided that the following conditions are | 6 # modification, are permitted provided that the following conditions are |
| 7 # met: | 7 # met: |
| 8 # | 8 # |
| 9 # * Redistributions of source code must retain the above copyright | 9 # * Redistributions of source code must retain the above copyright |
| 10 # notice, this list of conditions and the following disclaimer. | 10 # notice, this list of conditions and the following disclaimer. |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 28 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 29 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 29 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 30 | 30 |
| 31 """Front end of some style-checker modules.""" | 31 """Front end of some style-checker modules.""" |
| 32 | 32 |
| 33 import logging | 33 import logging |
| 34 import os.path | 34 import os.path |
| 35 import re | 35 import re |
| 36 import sys | 36 import sys |
| 37 | 37 |
| 38 from checkers.common import categories as CommonCategories | |
| 39 from checkers.common import CarriageReturnChecker | |
| 40 from checkers.cpp import CppChecker | |
| 41 from checkers.jsonchecker import JSONChecker | |
| 42 from checkers.png import PNGChecker | |
| 43 from checkers.python import PythonChecker | |
| 44 from checkers.test_expectations import TestExpectationsChecker | |
| 45 from checkers.text import TextChecker | |
| 46 from checkers.xcodeproj import XcodeProjectFileChecker | |
| 47 from checkers.xml import XMLChecker | |
| 48 from error_handlers import DefaultStyleErrorHandler | |
| 49 from filter import FilterConfiguration | |
| 50 from optparser import ArgumentParser | |
| 51 from optparser import DefaultCommandOptionValues | |
| 52 from webkitpy.common.system.log_utils import configure_logging as _configure_log
ging | 38 from webkitpy.common.system.log_utils import configure_logging as _configure_log
ging |
| 39 from webkitpy.style.checkers.common import CarriageReturnChecker |
| 40 from webkitpy.style.checkers.common import categories as CommonCategories |
| 41 from webkitpy.style.checkers.cpp import CppChecker |
| 42 from webkitpy.style.checkers.jsonchecker import JSONChecker |
| 43 from webkitpy.style.checkers.png import PNGChecker |
| 44 from webkitpy.style.checkers.python import PythonChecker |
| 45 from webkitpy.style.checkers.test_expectations import TestExpectationsChecker |
| 46 from webkitpy.style.checkers.text import TextChecker |
| 47 from webkitpy.style.checkers.xcodeproj import XcodeProjectFileChecker |
| 48 from webkitpy.style.checkers.xml import XMLChecker |
| 49 from webkitpy.style.error_handlers import DefaultStyleErrorHandler |
| 50 from webkitpy.style.filter import FilterConfiguration |
| 51 from webkitpy.style.optparser import ArgumentParser |
| 52 from webkitpy.style.optparser import DefaultCommandOptionValues |
| 53 | 53 |
| 54 | 54 |
| 55 _log = logging.getLogger(__name__) | 55 _log = logging.getLogger(__name__) |
| 56 | 56 |
| 57 | 57 |
| 58 # These are default option values for the command-line option parser. | 58 # These are default option values for the command-line option parser. |
| 59 _DEFAULT_MIN_CONFIDENCE = 1 | 59 _DEFAULT_MIN_CONFIDENCE = 1 |
| 60 _DEFAULT_OUTPUT_FORMAT = 'emacs' | 60 _DEFAULT_OUTPUT_FORMAT = 'emacs' |
| 61 | 61 |
| 62 | 62 |
| (...skipping 648 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 711 checker = self._dispatcher.dispatch(file_path, | 711 checker = self._dispatcher.dispatch(file_path, |
| 712 style_error_handler, | 712 style_error_handler, |
| 713 min_confidence) | 713 min_confidence) |
| 714 | 714 |
| 715 if checker is None: | 715 if checker is None: |
| 716 raise AssertionError("File should not be checked: '%s'" % file_path) | 716 raise AssertionError("File should not be checked: '%s'" % file_path) |
| 717 | 717 |
| 718 _log.debug("Using class: " + checker.__class__.__name__) | 718 _log.debug("Using class: " + checker.__class__.__name__) |
| 719 | 719 |
| 720 checker.check(lines) | 720 checker.check(lines) |
| OLD | NEW |