diff --git a/Library/Homebrew/dev-cmd/audit.rb b/Library/Homebrew/dev-cmd/audit.rb index 61ed6693bf..c7082b7f42 100644 --- a/Library/Homebrew/dev-cmd/audit.rb +++ b/Library/Homebrew/dev-cmd/audit.rb @@ -193,8 +193,8 @@ module Homebrew formula_count += 1 problem_count += fa.problems.size problem_lines = format_problem_lines(fa.problems) - corrected_problem_count = options[:style_offenses]&.count(&:corrected?) - new_formula_problem_lines = format_problem_lines(fa.new_formula_problems) + corrected_problem_count += options.fetch(:style_offenses, []).count(&:corrected?) + new_formula_problem_lines += format_problem_lines(fa.new_formula_problems) if args.display_filename? puts problem_lines.map { |s| "#{f.path}: #{s}" } else