Index: third_party/pylint/reporters/html.py |
diff --git a/third_party/pylint/reporters/html.py b/third_party/pylint/reporters/html.py |
index 71d46ebab02ce874da6081bc00888559e2e8eab6..56efcd6d1f93aea19173b5d64c376438a23aad5f 100644 |
--- a/third_party/pylint/reporters/html.py |
+++ b/third_party/pylint/reporters/html.py |
@@ -1,4 +1,5 @@ |
-# Copyright (c) 2003-2013 LOGILAB S.A. (Paris, FRANCE). |
+# Copyright (c) 2003-2006 Sylvain Thenault (thenault@gmail.com). |
+# Copyright (c) 2003-2011 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 |
@@ -10,7 +11,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., |
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
+# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
"""HTML reporter""" |
import sys |
@@ -19,14 +20,13 @@ from cgi import escape |
from logilab.common.ureports import HTMLWriter, Section, Table |
from pylint.interfaces import IReporter |
-from pylint.reporters import BaseReporter, Message |
+from pylint.reporters import BaseReporter |
class HTMLReporter(BaseReporter): |
"""report messages and layouts in HTML""" |
__implements__ = IReporter |
- name = 'html' |
extension = 'html' |
def __init__(self, output=sys.stdout): |
@@ -35,9 +35,12 @@ class HTMLReporter(BaseReporter): |
def add_message(self, msg_id, location, msg): |
"""manage message of different type and in the context of path""" |
- msg = Message(self, msg_id, location, msg) |
- self.msgs += (msg.category, msg.module, msg.obj, |
- str(msg.line), str(msg.column), escape(msg.msg)) |
+ 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)] |
def set_output(self, output=None): |
"""set output stream |
@@ -64,7 +67,3 @@ class HTMLReporter(BaseReporter): |
self.msgs = [] |
HTMLWriter().format(layout, self.out) |
- |
-def register(linter): |
- """Register the reporter classes with the linter.""" |
- linter.register_reporter(HTMLReporter) |