Class: Pluginscan::CheckFindingsPrinter

Inherits:
Printer
  • Object
show all
Defined in:
lib/pluginscan/reports/issues_report/issues_printer/check_findings_printer.rb

Overview

Responsible for printing a check description and all of the findings associated with that check

Instance Method Summary collapse

Methods inherited from Printer

#initialize, #print_blank_line

Constructor Details

This class inherits a constructor from Pluginscan::Printer

Instance Method Details



5
6
7
8
9
10
11
# File 'lib/pluginscan/reports/issues_report/issues_printer/check_findings_printer.rb', line 5

def print(check, findings)
  return if findings.empty? && check.name != 'Encoding' # Encoding deliberately has no findings because its a file-level check. TODO: Find a better way to handle this. The benefits of filtering out findings before we try and print them are significant.

  @output.puts CheckView.new(check).title_line
  print_findings(findings)
  print_blank_line
end