summaryrefslogtreecommitdiff
path: root/src/flake8
diff options
context:
space:
mode:
Diffstat (limited to 'src/flake8')
-rw-r--r--src/flake8/style_guide.py3
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