Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(24)

Side by Side Diff: third_party/WebKit/Tools/Scripts/webkitpy/style/checker.py

Issue 2188623002: Change logging statements to not use the "%" operator. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 678 matching lines...) Expand 10 before | Expand all | Expand 10 after
689 self._carriage_checker_class = carriage_checker_class 689 self._carriage_checker_class = carriage_checker_class
690 self._configuration = configuration 690 self._configuration = configuration
691 self._dispatcher = dispatcher 691 self._dispatcher = dispatcher
692 self._increment_error_count = increment_error_count 692 self._increment_error_count = increment_error_count
693 693
694 def should_process(self, file_path): 694 def should_process(self, file_path):
695 """Return whether the file should be checked for style.""" 695 """Return whether the file should be checked for style."""
696 if self._dispatcher.should_skip_without_warning(file_path): 696 if self._dispatcher.should_skip_without_warning(file_path):
697 return False 697 return False
698 if self._dispatcher.should_skip_with_warning(file_path): 698 if self._dispatcher.should_skip_with_warning(file_path):
699 _log.warn('File exempt from style guide. Skipping: "%s"' 699 _log.warning('File exempt from style guide. Skipping: "%s"', file_pa th)
700 % file_path)
701 return False 700 return False
702 return True 701 return True
703 702
704 def process(self, lines, file_path, line_numbers=None): 703 def process(self, lines, file_path, line_numbers=None):
705 """Check the given lines for style. 704 """Check the given lines for style.
706 705
707 Arguments: 706 Arguments:
708 lines: A list of all lines in the file to check. 707 lines: A list of all lines in the file to check.
709 file_path: The path of the file to process. If possible, the path 708 file_path: The path of the file to process. If possible, the path
710 should be relative to the source root. Otherwise, 709 should be relative to the source root. Otherwise,
(...skipping 23 matching lines...) Expand all
734 checker = self._dispatcher.dispatch(file_path, 733 checker = self._dispatcher.dispatch(file_path,
735 style_error_handler, 734 style_error_handler,
736 min_confidence) 735 min_confidence)
737 736
738 if checker is None: 737 if checker is None:
739 raise AssertionError("File should not be checked: '%s'" % file_path) 738 raise AssertionError("File should not be checked: '%s'" % file_path)
740 739
741 _log.debug("Using class: " + checker.__class__.__name__) 740 _log.debug("Using class: " + checker.__class__.__name__)
742 741
743 checker.check(lines) 742 checker.check(lines)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698