Title: [159636] trunk/Tools
Revision
159636
Author
[email protected]
Date
2013-11-21 11:02:08 -0800 (Thu, 21 Nov 2013)

Log Message

Unreviewed, rolling out r159633.
http://trac.webkit.org/changeset/159633
https://bugs.webkit.org/show_bug.cgi?id=124726

it broke 10 webkitpy tests (Requested by dino_ on #webkit).

* Scripts/webkitpy/style/checker.py:
(check_webkit_style_configuration):
(CheckerDispatcher.dispatch):
(StyleProcessorConfiguration):
(StyleProcessorConfiguration.__init__):
(StyleProcessorConfiguration.write_style_error):

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (159635 => 159636)


--- trunk/Tools/ChangeLog	2013-11-21 18:32:11 UTC (rev 159635)
+++ trunk/Tools/ChangeLog	2013-11-21 19:02:08 UTC (rev 159636)
@@ -1,3 +1,18 @@
+2013-11-21  Commit Queue  <[email protected]>
+
+        Unreviewed, rolling out r159633.
+        http://trac.webkit.org/changeset/159633
+        https://bugs.webkit.org/show_bug.cgi?id=124726
+
+        it broke 10 webkitpy tests (Requested by dino_ on #webkit).
+
+        * Scripts/webkitpy/style/checker.py:
+        (check_webkit_style_configuration):
+        (CheckerDispatcher.dispatch):
+        (StyleProcessorConfiguration):
+        (StyleProcessorConfiguration.__init__):
+        (StyleProcessorConfiguration.write_style_error):
+
 2013-11-21  László Langó  <[email protected]>
 
         Remove the stderr_write attribute from StyleProcessorConfiguration.

Modified: trunk/Tools/Scripts/webkitpy/style/checker.py (159635 => 159636)


--- trunk/Tools/Scripts/webkitpy/style/checker.py	2013-11-21 18:32:11 UTC (rev 159635)
+++ trunk/Tools/Scripts/webkitpy/style/checker.py	2013-11-21 19:02:08 UTC (rev 159636)
@@ -395,7 +395,8 @@
     return StyleProcessorConfiguration(filter_configuration=filter_configuration,
                max_reports_per_category=_MAX_REPORTS_PER_CATEGORY,
                min_confidence=options.min_confidence,
-               output_format=options.output_format)
+               output_format=options.output_format,
+               stderr_write=sys.stderr.write)
 
 
 def _create_log_handlers(stream):
@@ -642,6 +643,8 @@
         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.
@@ -653,13 +656,17 @@
       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):
+                 output_format,
+                 stderr_write):
         """Create a StyleProcessorConfiguration instance.
 
         Args:
@@ -678,12 +685,16 @@
                          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.
@@ -713,11 +724,11 @@
                           message):
         """Write a style error to the configured stderr."""
         if self._output_format == 'vs7':
-            format_string = "%s(%s):  %s  [%s] [%d]"
+            format_string = "%s(%s):  %s  [%s] [%d]\n"
         else:
-            format_string = "%s:%s:  %s  [%s] [%d]"
+            format_string = "%s:%s:  %s  [%s] [%d]\n"
 
-        _log.error(format_string % (file_path,
+        self.stderr_write(format_string % (file_path,
                                            line_number,
                                            message,
                                            category,
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to