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

Unified Diff: third_party/pylint/reporters/html.py

Issue 739393004: Revert "Revert "pylint: upgrade to 1.3.1"" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools/
Patch Set: Created 6 years, 1 month 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
« no previous file with comments | « third_party/pylint/reporters/guireporter.py ('k') | third_party/pylint/reporters/text.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/pylint/reporters/html.py
===================================================================
--- third_party/pylint/reporters/html.py (revision 293047)
+++ third_party/pylint/reporters/html.py (working copy)
@@ -1,5 +1,4 @@
-# Copyright (c) 2003-2006 Sylvain Thenault (thenault@gmail.com).
-# Copyright (c) 2003-2011 LOGILAB S.A. (Paris, FRANCE).
+# Copyright (c) 2003-2013 LOGILAB S.A. (Paris, FRANCE).
# This program is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free Software
# Foundation; either version 2 of the License, or (at your option) any later
@@ -11,7 +10,7 @@
#
# You should have received a copy of the GNU General Public License along with
# this program; if not, write to the Free Software Foundation, Inc.,
-# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
"""HTML reporter"""
import sys
@@ -20,7 +19,7 @@
from logilab.common.ureports import HTMLWriter, Section, Table
from pylint.interfaces import IReporter
-from pylint.reporters import BaseReporter
+from pylint.reporters import BaseReporter, Message
class HTMLReporter(BaseReporter):
@@ -27,6 +26,7 @@
"""report messages and layouts in HTML"""
__implements__ = IReporter
+ name = 'html'
extension = 'html'
def __init__(self, output=sys.stdout):
@@ -35,12 +35,9 @@
def add_message(self, msg_id, location, msg):
"""manage message of different type and in the context of path"""
- module, obj, line, col_offset = location[1:]
- if self.include_ids:
- sigle = msg_id
- else:
- sigle = msg_id[0]
- self.msgs += [sigle, module, obj, str(line), str(col_offset), escape(msg)]
+ msg = Message(self, msg_id, location, msg)
+ self.msgs += (msg.category, msg.module, msg.obj,
+ str(msg.line), str(msg.column), escape(msg.msg))
def set_output(self, output=None):
"""set output stream
@@ -67,3 +64,7 @@
self.msgs = []
HTMLWriter().format(layout, self.out)
+
+def register(linter):
+ """Register the reporter classes with the linter."""
+ linter.register_reporter(HTMLReporter)
« no previous file with comments | « third_party/pylint/reporters/guireporter.py ('k') | third_party/pylint/reporters/text.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698