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

Unified Diff: Tools/Scripts/webkitpy/thirdparty/pylint/reporters/guireporter.py

Issue 18418010: Check in the thirdparty libs needed for webkitpy. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: Tools/Scripts/webkitpy/thirdparty/pylint/reporters/guireporter.py
diff --git a/Tools/Scripts/webkitpy/thirdparty/pylint/reporters/guireporter.py b/Tools/Scripts/webkitpy/thirdparty/pylint/reporters/guireporter.py
new file mode 100644
index 0000000000000000000000000000000000000000..13914ba8fc722ffc4559c31fe8530d04a6b08ba6
--- /dev/null
+++ b/Tools/Scripts/webkitpy/thirdparty/pylint/reporters/guireporter.py
@@ -0,0 +1,36 @@
+""" reporter used by gui.py """
+
+import sys
+
+from pylint.interfaces import IReporter
+from pylint.reporters import BaseReporter
+from logilab.common.ureports import TextWriter
+
+
+class GUIReporter(BaseReporter):
+ """saves messages"""
+
+ __implements__ = IReporter
+ extension = ''
+
+ def __init__(self, gui, output=sys.stdout):
+ """init"""
+ BaseReporter.__init__(self, output)
+ self.msgs = []
+ self.gui = gui
+
+ def add_message(self, msg_id, location, msg):
+ """manage message of different type and in the context of path"""
+ module, obj, line = location[1:]
+ if self.include_ids:
+ sigle = msg_id
+ else:
+ sigle = msg_id[0]
+
+ full_msg = [sigle, module, obj, str(line), msg]
+ self.msgs += [[sigle, module, obj, str(line)]]
+ self.gui.msg_queue.put(full_msg)
+
+ def _display(self, layout):
+ """launch layouts display"""
+ TextWriter().format(layout, self.out)

Powered by Google App Engine
This is Rietveld 408576698