Skip to content

Commit

Permalink
Deal with severity issue overriding (yandex#53)
Browse files Browse the repository at this point in the history
  • Loading branch information
buglloc authored May 19, 2017
1 parent 9643318 commit 183aae6
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions gixy/core/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,11 @@ def results(self):
def stats(self):
stats = dict.fromkeys(gixy.severity.ALL, 0)
for plugin in self.auditor.plugins:
if plugin.issues:
stats[plugin.severity] += len(plugin.issues)
base_severity = plugin.severity
for issue in plugin.issues:
# TODO(buglloc): encapsulate into Issue class?
severity = issue.severity if issue.severity else base_severity
stats[severity] += 1
return stats

def _audit_recursive(self, tree):
Expand Down

0 comments on commit 183aae6

Please sign in to comment.