summaryrefslogtreecommitdiff
path: root/reporters
diff options
context:
space:
mode:
authorSylvain Th?nault <sylvain.thenault@logilab.fr>2011-10-04 10:32:07 +0200
committerSylvain Th?nault <sylvain.thenault@logilab.fr>2011-10-04 10:32:07 +0200
commitf46c5c37d7fd23f1d7c1061cbc59aa1ce408007a (patch)
tree95368ffbbbaa629cc3e32a6f088179959b7aee00 /reporters
parentdbaa86ab6115358b2c5dc7f751ed37f1f0b5ec47 (diff)
downloadpylint-f46c5c37d7fd23f1d7c1061cbc59aa1ce408007a.tar.gz
closes #73941: HTML reports badly formatted since col_offset addition, which was only partially added to the report
Diffstat (limited to 'reporters')
-rw-r--r--reporters/html.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/reporters/html.py b/reporters/html.py
index e1f9b1f..56efcd6 100644
--- a/reporters/html.py
+++ b/reporters/html.py
@@ -1,5 +1,5 @@
# Copyright (c) 2003-2006 Sylvain Thenault (thenault@gmail.com).
-# Copyright (c) 2003-2006 LOGILAB S.A. (Paris, FRANCE).
+# 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
@@ -28,7 +28,7 @@ class HTMLReporter(BaseReporter):
__implements__ = IReporter
extension = 'html'
-
+
def __init__(self, output=sys.stdout):
BaseReporter.__init__(self, output)
self.msgs = []
@@ -40,19 +40,19 @@ class HTMLReporter(BaseReporter):
sigle = msg_id
else:
sigle = msg_id[0]
- self.msgs += [sigle, module, obj, str(line), escape(msg)]
-
+ self.msgs += [sigle, module, obj, str(line), str(col_offset), escape(msg)]
+
def set_output(self, output=None):
"""set output stream
-
+
messages buffered for old output is processed first"""
if self.out and self.msgs:
self._display(Section())
BaseReporter.set_output(self, output)
-
+
def _display(self, layout):
"""launch layouts display
-
+
overridden from BaseReporter to add insert the messages section
(in add_message, message is not displayed, just collected so it
can be displayed in an html table)
@@ -63,7 +63,7 @@ class HTMLReporter(BaseReporter):
msgs += self.msgs
sect = Section('Messages')
layout.append(sect)
- sect.append(Table(cols=5, children=msgs, rheaders=1))
+ sect.append(Table(cols=6, children=msgs, rheaders=1))
self.msgs = []
HTMLWriter().format(layout, self.out)