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

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

Issue 2014063002: Run format-webkit on webkitpy code (without string conversion). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 4 years, 6 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) 2010 Chris Jerdonek (cjerdonek@webkit.org) 1 # Copyright (C) 2010 Chris Jerdonek (cjerdonek@webkit.org)
2 # 2 #
3 # Redistribution and use in source and binary forms, with or without 3 # Redistribution and use in source and binary forms, with or without
4 # modification, are permitted provided that the following conditions 4 # modification, are permitted provided that the following conditions
5 # are met: 5 # are met:
6 # 1. Redistributions of source code must retain the above copyright 6 # 1. Redistributions of source code must retain the above copyright
7 # notice, this list of conditions and the following disclaimer. 7 # notice, this list of conditions and the following disclaimer.
8 # 2. Redistributions in binary form must reproduce the above copyright 8 # 2. Redistributions in binary form must reproduce the above copyright
9 # notice, this list of conditions and the following disclaimer in the 9 # notice, this list of conditions and the following disclaimer in the
10 # documentation and/or other materials provided with the distribution. 10 # documentation and/or other materials provided with the distribution.
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 "whitespace/newline". 42 "whitespace/newline".
43 confidence: An integer between 1 and 5 inclusive that represents the 43 confidence: An integer between 1 and 5 inclusive that represents the
44 application's level of confidence in the error. The value 44 application's level of confidence in the error. The value
45 5 means that we are certain of the problem, and the 45 5 means that we are certain of the problem, and the
46 value 1 means that it could be a legitimate construct. 46 value 1 means that it could be a legitimate construct.
47 message: The error message to report. 47 message: The error message to report.
48 48
49 """ 49 """
50 50
51 51
52
53
54 class DefaultStyleErrorHandler(object): 52 class DefaultStyleErrorHandler(object):
55 53
56 """The default style error handler.""" 54 """The default style error handler."""
57 55
58 def __init__(self, file_path, configuration, increment_error_count, 56 def __init__(self, file_path, configuration, increment_error_count,
59 line_numbers=None): 57 line_numbers=None):
60 """Create a default style error handler. 58 """Create a default style error handler.
61 59
62 Args: 60 Args:
63 file_path: The path to the file containing the error. This 61 file_path: The path to the file containing the error. This
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 152
155 self._configuration.write_style_error(category=category, 153 self._configuration.write_style_error(category=category,
156 confidence_in_error=confidence, 154 confidence_in_error=confidence,
157 file_path=self._file_path, 155 file_path=self._file_path,
158 line_number=line_number, 156 line_number=line_number,
159 message=message) 157 message=message)
160 if category_total == max_reports: 158 if category_total == max_reports:
161 self._configuration.stderr_write("Suppressing further [%s] reports " 159 self._configuration.stderr_write("Suppressing further [%s] reports "
162 "for this file.\n" % category) 160 "for this file.\n" % category)
163 return True 161 return True
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698