Skip to main content

ResourceForcingCompileTime

All Cookstyle Cops


The department is: Chef/Modernize

The full name of the cop is: Chef/Modernize/ResourceForcingCompileTime


Enabled by defaultSupports autocorrectionTarget Chef Version
EnabledNoAll Versions

The hostname, build_essential, chef_gem, and ohai_hint resources include ‘compile_time’ properties, which should be used to force the resources to run at compile time by setting compile_time true.

Examples

incorrect

build_essential 'install build tools' do
 action :nothing
end.run_action(:install)

correct

build_essential 'install build tools' do
 compile_time true
end

Configurable attributes

NameDefault valueConfigurable values
Version Added5.18.0String
Exclude
  • **/metadata.rb
  • **/attributes/*.rb
  • **/Berksfile
Array

Was this page helpful?