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

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

Issue 1846093002: Revert of Remove unused imports in webkitpy. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 import sys
52 53
53 54
54 class DefaultStyleErrorHandler(object): 55 class DefaultStyleErrorHandler(object):
55 56
56 """The default style error handler.""" 57 """The default style error handler."""
57 58
58 def __init__(self, file_path, configuration, increment_error_count, 59 def __init__(self, file_path, configuration, increment_error_count,
59 line_numbers=None): 60 line_numbers=None):
60 """Create a default style error handler. 61 """Create a default style error handler.
61 62
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 155
155 self._configuration.write_style_error(category=category, 156 self._configuration.write_style_error(category=category,
156 confidence_in_error=confidence, 157 confidence_in_error=confidence,
157 file_path=self._file_path, 158 file_path=self._file_path,
158 line_number=line_number, 159 line_number=line_number,
159 message=message) 160 message=message)
160 if category_total == max_reports: 161 if category_total == max_reports:
161 self._configuration.stderr_write("Suppressing further [%s] reports " 162 self._configuration.stderr_write("Suppressing further [%s] reports "
162 "for this file.\n" % category) 163 "for this file.\n" % category)
163 return True 164 return True
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698