Class: Scanny::Reporters::SimpleReporter

Inherits:
Reporter
  • Object
show all
Defined in:
lib/scanny/reporters/simple_reporter.rb

Instance Attribute Summary

Attributes inherited from Reporter

#checks_performed, #file, #issues, #nodes_inspected

Instance Method Summary collapse

Methods inherited from Reporter

#initialize

Constructor Details

This class inherits a constructor from Scanny::Reporters::Reporter

Instance Method Details

#reportObject



6
7
8
9
10
11
12
13
14
15
16
# File 'lib/scanny/reporters/simple_reporter.rb', line 6

def report
  string =  "#{file} [#{checks_performed} checks done | "
  string += "#{nodes_inspected} nodes inspected | #{issues.size} issues]"

  issues.each do |issue|
    string += "\n  - #{issue.to_s}"
  end
  puts string unless issues.empty?

  string
end