mirror of
https://github.com/inspec/inspec
synced 2024-11-23 13:13:22 +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)
|
def headline(title)
|
||||||
puts title
|
puts title
|
||||||
title.each_char { print '-' }
|
title.each_char { print '-' }
|
||||||
newline
|
puts
|
||||||
end
|
end
|
||||||
|
|
||||||
def li(entry)
|
def li(entry)
|
||||||
puts " #{mark_text('*')} #{entry}"
|
puts " #{mark_text('*')} #{entry}"
|
||||||
end
|
end
|
||||||
|
|
||||||
def newline
|
|
||||||
print "\n"
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
class Inspec::InspecCLI < Inspec::BaseCLI # rubocop:disable Metrics/ClassLength
|
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|
|
%w{location profile controls timestamp valid}.each { |item|
|
||||||
puts "#{mark_text(item.to_s.capitalize + ':')} #{result[:summary][item.to_sym]}"
|
puts "#{mark_text(item.to_s.capitalize + ':')} #{result[:summary][item.to_sym]}"
|
||||||
}
|
}
|
||||||
newline
|
puts
|
||||||
|
|
||||||
%w{errors warnings}.each { |list|
|
%w{errors warnings}.each { |list|
|
||||||
headline(list.to_s.capitalize)
|
headline(list.to_s.capitalize)
|
||||||
result[list.to_sym].each { |item|
|
result[list.to_sym].each { |item|
|
||||||
puts "#{item[:file]}:#{item[:line]}:#{item[:column]}: #{item[:msg]} "
|
puts "#{item[:file]}:#{item[:line]}:#{item[:column]}: #{item[:msg]} "
|
||||||
}
|
}
|
||||||
newline
|
puts
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
exit 1 unless result[:summary][:valid]
|
exit 1 unless result[:summary][:valid]
|
||||||
|
|
Loading…
Reference in a new issue