From a30a1b2aee49baab1374a5e3300cc3702dd56c92 Mon Sep 17 00:00:00 2001 From: Justin Collins Date: Wed, 30 Nov 2011 12:36:46 -0800 Subject: [PATCH] Fix summary showing warnings above threshold which looked strange when no warnings were reported but the summary said there were. --- lib/brakeman/report.rb | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/brakeman/report.rb b/lib/brakeman/report.rb index 9cdc372c..7239419b 100644 --- a/lib/brakeman/report.rb +++ b/lib/brakeman/report.rb @@ -464,10 +464,13 @@ class Brakeman::Report checks.template_warnings].each do |warnings| warnings.each do |warning| - summary[warning.warning_type.to_s] += 1 + unless warning.confidence > tracker.options[:min_confidence] - if warning.confidence == 0 - high_confidence_warnings += 1 + summary[warning.warning_type.to_s] += 1 + + if warning.confidence == 0 + high_confidence_warnings += 1 + end end end end -- GitLab