Skip to main content

DeclareActionClass

The department is: DeclareActionClass

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

Enabled by defaultSupports autocorrectionTarget Chef Version
EnabledYes12.9+

In Chef Infra Client 12.9 and later action_class can be used instead of declare_action_class.

Examples

incorrect

declare_action_class do
  foo
end

correct

action_class do
  foo
end

Configurable attributes

NameDefault valueConfigurable values
Version Added7.26.0String
Include
  • **/resources/*.rb
  • **/libraries/*.rb
Array

Was this page helpful?

×









Search Results