mirror of
https://github.com/inspec/inspec
synced 2024-11-23 05:03:07 +00:00
remove def newline :-)
This commit is contained in:
parent
7494854c60
commit
30aabc4f42
1 changed files with 3 additions and 7 deletions
10
bin/inspec
10
bin/inspec
|
@ -126,16 +126,12 @@ class Inspec::BaseCLI < Thor
|
|||
def headline(title)
|
||||
puts title
|
||||
title.each_char { print '-' }
|
||||
newline
|
||||
puts
|
||||
end
|
||||
|
||||
def li(entry)
|
||||
puts " #{mark_text('*')} #{entry}"
|
||||
end
|
||||
|
||||
def newline
|
||||
print "\n"
|
||||
end
|
||||
end
|
||||
|
||||
class Inspec::InspecCLI < Inspec::BaseCLI # rubocop:disable Metrics/ClassLength
|
||||
|
@ -186,14 +182,14 @@ class Inspec::InspecCLI < Inspec::BaseCLI # rubocop:disable Metrics/ClassLength
|
|||
%w{location profile controls timestamp valid}.each { |item|
|
||||
puts "#{mark_text(item.to_s.capitalize + ':')} #{result[:summary][item.to_sym]}"
|
||||
}
|
||||
newline
|
||||
puts
|
||||
|
||||
%w{errors warnings}.each { |list|
|
||||
headline(list.to_s.capitalize)
|
||||
result[list.to_sym].each { |item|
|
||||
puts "#{item[:file]}:#{item[:line]}:#{item[:column]}: #{item[:msg]} "
|
||||
}
|
||||
newline
|
||||
puts
|
||||
}
|
||||
end
|
||||
exit 1 unless result[:summary][:valid]
|
||||
|
|
Loading…
Reference in a new issue