diff options
author | Claudiu Popa <cpopa@cloudbasesolutions.com> | 2015-03-28 16:02:22 +0200 |
---|---|---|
committer | Claudiu Popa <cpopa@cloudbasesolutions.com> | 2015-03-28 16:02:22 +0200 |
commit | dc4777945536c677e972a7c26b4baaf4fed249f9 (patch) | |
tree | 67ff6082b37b0d31f9225bea834655b5353fa493 /pylint/lint.py | |
parent | 31bd01cf2904b9a2c8a24e54ab6340bcdf3a901a (diff) | |
download | pylint-dc4777945536c677e972a7c26b4baaf4fed249f9.tar.gz |
Improve the message report for --jobs. Closes issue #501.
Diffstat (limited to 'pylint/lint.py')
-rw-r--r-- | pylint/lint.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/pylint/lint.py b/pylint/lint.py index 0df8475..e8e7577 100644 --- a/pylint/lint.py +++ b/pylint/lint.py @@ -29,7 +29,6 @@ from __future__ import print_function import collections import contextlib -import itertools import operator import os try: @@ -97,7 +96,11 @@ def _get_python_path(filepath): def _merge_stats(stats): merged = {} + by_msg = collections.Counter() for stat in stats: + message_stats = stat.pop('by_msg', {}) + by_msg.update(message_stats) + for key, item in six.iteritems(stat): if key not in merged: merged[key] = item @@ -106,6 +109,8 @@ def _merge_stats(stats): merged[key].update(item) else: merged[key] = merged[key] + item + + merged['by_msg'] = by_msg return merged @@ -827,7 +832,7 @@ class PyLinter(configuration.OptionsManagerMixIn, all_stats.append(stats) self.msg_status |= msg_status - self.stats = _merge_stats(itertools.chain(all_stats, [self.stats])) + self.stats = _merge_stats(all_stats) self.current_name = module # Insert stats data to local checkers. |