summaryrefslogtreecommitdiff
path: root/src/flake8/main/application.py
diff options
context:
space:
mode:
authorIan Cordasco <graffatcolmingov@gmail.com>2016-07-25 14:29:09 -0500
committerIan Cordasco <graffatcolmingov@gmail.com>2016-07-25 14:29:09 -0500
commit4dc1d11a627a571eeae4e0ae3da7b94e7de04214 (patch)
treefee0c2657ffb9d298305fa775ff4abd24cfd6c54 /src/flake8/main/application.py
parentfc035c4df280e1f10c2e1f73ce8c2ea2af5c99a7 (diff)
downloadflake8-bug/180.tar.gz
Wire-up --statistics againbug/180
I'm not sure where this code went or when, but it disappeared. Let's add it back. Related #180
Diffstat (limited to 'src/flake8/main/application.py')
-rw-r--r--src/flake8/main/application.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/flake8/main/application.py b/src/flake8/main/application.py
index febe6c7..464ff92 100644
--- a/src/flake8/main/application.py
+++ b/src/flake8/main/application.py
@@ -263,6 +263,13 @@ class Application(object):
LOG.info('Found a total of %d violations and reported %d',
self.total_result_count, self.result_count)
+ def report_statistics(self):
+ """Aggregate and report statistics from this run."""
+ if not self.options.statistics:
+ return
+
+ self.formatter.show_statistics(self.guide.stats)
+
def initialize(self, argv):
# type: () -> NoneType
"""Initialize the application to be run.
@@ -285,6 +292,7 @@ class Application(object):
self.initialize(argv)
self.run_checks()
self.report_errors()
+ self.report_statistics()
self.report_benchmarks()
def run(self, argv=None):