Skip to main content

Chef/Modernize/EmptyResourceInitializeMethod

Cookstyle cops page

The Cookstyle cops department: Chef/Modernize

Enabled by defaultSupports autocorrectionTarget Chef Version
EnabledYesAll Versions

There is no need for an empty initialize method in a resource

Examples

incorrect

def initialize(*args)
  super
end

Configurable attributes

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

Thank you for your feedback!

×