Skip to main content

Chef/Modernize/ActionMethodInResource

Cookstyle cops page

The Cookstyle cops department: Chef/Modernize

Enabled by defaultSupports autocorrectionTarget Chef Version
EnabledYesAll Versions

Use the custom resource language’s action :my_action blocks instead of creating actions with methods.

Examples

incorrect

def action_create
 # :create action code here
end

correct

action :create do
 # :create action code here
end

Configurable attributes

NameDefault valueConfigurable values
Version Added6.13.0String
Include
  • **/resources/*.rb
  • **/providers/*.rb
Array

Thank you for your feedback!

×











Search Results