summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Smith <tsmith84@gmail.com>2021-02-03 15:44:39 -0800
committerTim Smith <tsmith84@gmail.com>2021-02-03 15:44:39 -0800
commita9fe893febadf58e570cdddba77f8c5a030d5cd6 (patch)
tree83a4e254d1b06caace51b7acb4f89373f3ea6865
parent8482b2f5df0333b2551dcc844ccac198838012d6 (diff)
downloadchef-a9fe893febadf58e570cdddba77f8c5a030d5cd6.tar.gz
Chefstyle fixes + release notes update
Signed-off-by: Tim Smith <tsmith@chef.io>
-rw-r--r--RELEASE_NOTES.md1
-rw-r--r--lib/chef/compliance/reporter/cli.rb14
2 files changed, 8 insertions, 7 deletions
diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md
index 2ed911ebff..6e19d81034 100644
--- a/RELEASE_NOTES.md
+++ b/RELEASE_NOTES.md
@@ -11,6 +11,7 @@ This section serves to track things we should later document here for 17.0
- remove support for RHEL 6 i386 / Ubuntu 16.04
- don't write out node['filesystem2'] data on AIX/Solaris/FreeBSD: https://github.com/chef/ohai/pull/1592
- Improved performance in systemd_unit resource - https://github.com/chef/chef/pull/10925
+- Compliance cli report - https://github.com/chef/chef/pull/10939
## What's New in 16.9.32
diff --git a/lib/chef/compliance/reporter/cli.rb b/lib/chef/compliance/reporter/cli.rb
index e8bcee46c4..4905c1f653 100644
--- a/lib/chef/compliance/reporter/cli.rb
+++ b/lib/chef/compliance/reporter/cli.rb
@@ -12,7 +12,7 @@ class Chef
profile[:controls].each do |control|
next if control[:results].nil?
- output << "#{' ' * 6}#{control[:title]}"
+ output << "#{" " * 6}#{control[:title]}"
control[:results].each do |result|
output << format_result(result)
end
@@ -38,31 +38,31 @@ class Chef
if result[:status] == "failed"
if result[:code_desc]
found = true
- output << pastel.red("#{' ' * 9}- #{result[:code_desc]}")
+ output << pastel.red("#{" " * 9}- #{result[:code_desc]}")
end
if result[:message]
if found
result[:message].split(/\n/).reject(&:empty?).each do |m|
- output << pastel.red("#{' ' * 12}#{m}")
+ output << pastel.red("#{" " * 12}#{m}")
end
else
result[:message].split(/\n/).reject(&:empty?).each do |m|
- output << pastel.red("#{' ' * 9}#{m}")
+ output << pastel.red("#{" " * 9}#{m}")
end
end
found = true
end
unless found
- output << pastel.red("#{' ' * 9}- #{result[:status]}")
+ output << pastel.red("#{" " * 9}- #{result[:status]}")
end
else
found = false
if result[:code_desc]
found = true
- output << pastel.green("#{' ' * 9}+ #{result[:code_desc]}")
+ output << pastel.green("#{" " * 9}+ #{result[:code_desc]}")
end
unless found
- output << pastel.green("#{' ' * 9}+ #{result[:status]}")
+ output << pastel.green("#{" " * 9}+ #{result[:status]}")
end
end
output