Modified: trunk/Tools/ChangeLog (159632 => 159633)
--- trunk/Tools/ChangeLog 2013-11-21 17:43:06 UTC (rev 159632)
+++ trunk/Tools/ChangeLog 2013-11-21 17:44:19 UTC (rev 159633)
@@ -1,3 +1,17 @@
+2013-11-21 László Langó <[email protected]>
+
+ Remove the stderr_write attribute from StyleProcessorConfiguration.
+ https://bugs.webkit.org/show_bug.cgi?id=124703
+
+ Reviewed by Brent Fulgham.
+
+ * Scripts/webkitpy/style/checker.py:
+ (check_webkit_style_configuration):
+ (CheckerDispatcher.dispatch):
+ (StyleProcessorConfiguration):
+ (StyleProcessorConfiguration.__init__):
+ (StyleProcessorConfiguration.write_style_error):
+
2013-11-21 Ryosuke Niwa <[email protected]>
PerfTestRunner._generate_results_dict shouldn't depend on test objects
Modified: trunk/Tools/Scripts/webkitpy/style/checker.py (159632 => 159633)
--- trunk/Tools/Scripts/webkitpy/style/checker.py 2013-11-21 17:43:06 UTC (rev 159632)
+++ trunk/Tools/Scripts/webkitpy/style/checker.py 2013-11-21 17:44:19 UTC (rev 159633)
@@ -395,8 +395,7 @@
return StyleProcessorConfiguration(filter_configuration=filter_configuration,
max_reports_per_category=_MAX_REPORTS_PER_CATEGORY,
min_confidence=options.min_confidence,
- output_format=options.output_format,
- stderr_write=sys.stderr.write)
+ output_format=options.output_format)
def _create_log_handlers(stream):
@@ -643,8 +642,6 @@
return checker
-# FIXME: Remove the stderr_write attribute from this class and replace
-# its use with calls to a logging module logger.
class StyleProcessorConfiguration(object):
"""Stores configuration values for the StyleProcessor class.
@@ -656,17 +653,13 @@
max_reports_per_category: The maximum number of errors to report
per category, per file.
- stderr_write: A function that takes a string as a parameter and
- serves as stderr.write.
-
"""
def __init__(self,
filter_configuration,
max_reports_per_category,
min_confidence,
- output_format,
- stderr_write):
+ output_format):
"""Create a StyleProcessorConfiguration instance.
Args:
@@ -685,16 +678,12 @@
output formats are "emacs" which emacs can parse
and "vs7" which Microsoft Visual Studio 7 can parse.
- stderr_write: A function that takes a string as a parameter and
- serves as stderr.write.
-
"""
self._filter_configuration = filter_configuration
self._output_format = output_format
self.max_reports_per_category = max_reports_per_category
self.min_confidence = min_confidence
- self.stderr_write = stderr_write
def is_reportable(self, category, confidence_in_error, file_path):
"""Return whether an error is reportable.
@@ -724,11 +713,11 @@
message):
"""Write a style error to the configured stderr."""
if self._output_format == 'vs7':
- format_string = "%s(%s): %s [%s] [%d]\n"
+ format_string = "%s(%s): %s [%s] [%d]"
else:
- format_string = "%s:%s: %s [%s] [%d]\n"
+ format_string = "%s:%s: %s [%s] [%d]"
- self.stderr_write(format_string % (file_path,
+ _log.error(format_string % (file_path,
line_number,
message,
category,