Skip to main content

ActionMethodInResource

The department is: ActionMethodInResource

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

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