diff options
| author | Sylvain Th?nault <sylvain.thenault@logilab.fr> | 2011-06-16 19:20:23 +0200 |
|---|---|---|
| committer | Sylvain Th?nault <sylvain.thenault@logilab.fr> | 2011-06-16 19:20:23 +0200 |
| commit | 2ece50559bea3ea01aabea7fba3cc3173ff25270 (patch) | |
| tree | 8e8b3e23eb92740581a3a6e6575417c777c46503 /reporters | |
| parent | 8de73909a123440e7ae42a27297e91ae11a6585f (diff) | |
| download | pylint-2ece50559bea3ea01aabea7fba3cc3173ff25270.tar.gz | |
closes #69220: add column offset to the astng node
Diffstat (limited to 'reporters')
| -rw-r--r-- | reporters/html.py | 4 | ||||
| -rw-r--r-- | reporters/text.py | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/reporters/html.py b/reporters/html.py index 2c8832c..e1f9b1f 100644 --- a/reporters/html.py +++ b/reporters/html.py @@ -35,7 +35,7 @@ class HTMLReporter(BaseReporter): def add_message(self, msg_id, location, msg): """manage message of different type and in the context of path""" - module, obj, line = location[1:] + module, obj, line, col_offset = location[1:] if self.include_ids: sigle = msg_id else: @@ -59,7 +59,7 @@ class HTMLReporter(BaseReporter): """ if self.msgs: # add stored messages to the layout - msgs = ['type', 'module', 'object', 'line', 'message'] + msgs = ['type', 'module', 'object', 'line', 'col_offset', 'message'] msgs += self.msgs sect = Section('Messages') layout.append(sect) diff --git a/reporters/text.py b/reporters/text.py index 2ceb6ba..a40fc2b 100644 --- a/reporters/text.py +++ b/reporters/text.py @@ -47,7 +47,7 @@ class TextReporter(BaseReporter): def add_message(self, msg_id, location, msg): """manage message of different type and in the context of path""" - module, obj, line = location[1:] + module, obj, line, col_offset = location[1:] if module not in self._modules: if module: self.writeln('************* Module %s' % module) @@ -60,7 +60,7 @@ class TextReporter(BaseReporter): sigle = msg_id else: sigle = msg_id[0] - self.writeln('%s:%3s%s: %s' % (sigle, line, obj, msg)) + self.writeln('%s:%3s,%s%s: %s' % (sigle, line, col_offset, obj, msg)) def _display(self, layout): """launch layouts display""" @@ -85,7 +85,7 @@ class ParseableTextReporter(TextReporter): def add_message(self, msg_id, location, msg): """manage message of different type and in the context of path""" - path, _, obj, line = location + path, _, obj, line, _ = location if obj: obj = ', %s' % obj if self.include_ids: |
