diff options
| author | Ian Cordasco <graffatcolmingov@gmail.com> | 2016-07-12 20:04:04 -0500 |
|---|---|---|
| committer | Ian Cordasco <graffatcolmingov@gmail.com> | 2016-07-12 20:04:04 -0500 |
| commit | 14cab7e81b1bed1022f4fdce32d4b1777b055988 (patch) | |
| tree | 4aca5c44210515b1c5a2e988160f08b27f45b140 /src/flake8 | |
| parent | 61430951ec13753aa49200222971ec646846b9b6 (diff) | |
| download | flake8-14cab7e81b1bed1022f4fdce32d4b1777b055988.tar.gz | |
Add statistics collection to StyleGuide
Diffstat (limited to 'src/flake8')
| -rw-r--r-- | src/flake8/style_guide.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/flake8/style_guide.py b/src/flake8/style_guide.py index 89890ba..ed1b844 100644 --- a/src/flake8/style_guide.py +++ b/src/flake8/style_guide.py @@ -5,6 +5,7 @@ import linecache import logging import re +from flake8 import statistics from flake8 import utils __all__ = ( @@ -74,6 +75,7 @@ class StyleGuide(object): self.options = options self.listener = listener_trie self.formatter = formatter + self.stats = statistics.Statistics() self._selected = tuple(options.select) self._ignored = tuple(options.ignore) self._decision_cache = {} @@ -267,6 +269,7 @@ class StyleGuide(object): if (error_is_selected and is_not_inline_ignored and is_included_in_diff): self.formatter.handle(error) + self.stats.record(error) self.listener.notify(error.code, error) return 1 return 0 |
