summaryrefslogtreecommitdiff
path: root/lib/chef/formatters/doc.rb
diff options
context:
space:
mode:
authorTim Smith <tsmith@chef.io>2021-09-23 16:30:29 -0700
committerGitHub <noreply@github.com>2021-09-23 16:30:29 -0700
commitf7f38591aa98dac71e2b4c83c23cfe39b16b9d99 (patch)
tree2f2baf87cd510ea997a7b23a5f16906440ffbafb /lib/chef/formatters/doc.rb
parenta9104bb5a2ec6efa0b1208fa39a3f04ad7f7b5c1 (diff)
parent1cee6c11a99b05b9fd5eef0665325f6fa1bbaa96 (diff)
downloadchef-f7f38591aa98dac71e2b4c83c23cfe39b16b9d99.tar.gz
Merge pull request #11904 from chef/lcg/compliance-segment
Native compliance phase
Diffstat (limited to 'lib/chef/formatters/doc.rb')
-rw-r--r--lib/chef/formatters/doc.rb46
1 files changed, 46 insertions, 0 deletions
diff --git a/lib/chef/formatters/doc.rb b/lib/chef/formatters/doc.rb
index 1b752a2924..f40af7b365 100644
--- a/lib/chef/formatters/doc.rb
+++ b/lib/chef/formatters/doc.rb
@@ -363,6 +363,52 @@ class Chef
end
end
+ # Called when compliance profile loading starts
+ def profiles_load_start
+ puts_line("Loading #{Inspec::Dist::PRODUCT_NAME} profile files:")
+ end
+
+ # Called when compliance input loading starts
+ def inputs_load_start
+ puts_line("Loading #{Inspec::Dist::PRODUCT_NAME} input files:")
+ end
+
+ # Called when compliance waiver loading starts
+ def waivers_load_start
+ puts_line("Loading #{Inspec::Dist::PRODUCT_NAME} waiver files:")
+ end
+
+ # Called when a compliance profile is found in a cookbook by the cookbook_compiler
+ def compliance_profile_loaded(profile)
+ start_line(" - #{profile.cookbook_name}::#{profile.pathname}", :cyan)
+ puts " (#{profile.version})", :cyan if profile.version
+ end
+
+ # Called when a compliance waiver is found in a cookbook by the cookbook_compiler
+ def compliance_input_loaded(input)
+ puts_line(" - #{input.cookbook_name}::#{input.pathname}", :cyan)
+ end
+
+ # Called when a compliance waiver is found in a cookbook by the cookbook_compiler
+ def compliance_waiver_loaded(waiver)
+ puts_line(" - #{waiver.cookbook_name}::#{waiver.pathname}", :cyan)
+ end
+
+ # Called when a compliance profile is enabled (by include_profile)
+ def compliance_profile_enabled(profile)
+ # puts_line(" * FIXME", :cyan)
+ end
+
+ # Called when a compliance waiver is enabled (by include_waiver)
+ def compliance_waiver_enabled(waiver)
+ # puts_line(" * FIXME", :cyan)
+ end
+
+ # Called when a compliance input is enabled (by include_input)
+ def compliance_input_enabled(input)
+ # puts_line(" * FIXME", :cyan)
+ end
+
# (see Base#deprecation)
def deprecation(deprecation, _location = nil)
if Chef::Config[:treat_deprecation_warnings_as_errors]