Class: SimpleStdoutResults

Inherits:
Object
  • Object
show all
Defined in:
lib/cfn-nag/result_view/simple_stdout_results.rb

Instance Method Summary collapse

Instance Method Details

#render(results) ⇒ Object



5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/cfn-nag/result_view/simple_stdout_results.rb', line 5

def render(results)
  results.each do |result|
    (1..60).each { print '-' }
    puts "\n" + result[:filename]
    (1..60).each { print '-' }

    result[:file_results][:violations].each do |violation|
      message message_type: "#{violation.type} #{violation.id}",
              message: violation.message,
              logical_resource_ids: violation.logical_resource_ids
    end
    puts "\nFailures count: #{Violation.count_failures(result[:file_results][:violations])}"
    puts "Warnings count: #{Violation.count_warnings(result[:file_results][:violations])}"
  end
end