Class: RuboCop::Cop::Chef::ChefCorrectness::DefaultMetadataMaintainer

Inherits:
RuboCop::Cop
  • Object
show all
Defined in:
lib/rubocop/cop/chef/correctness/default_maintainer_metadata.rb

Overview

Metadata contains default maintainer information from the ‘chef generate cookbook` command. This should be updated to reflect that actual maintainer of the cookbook.

Examples:


# bad
maintainer 'YOUR_COMPANY_NAME'
maintainer_email 'YOUR_EMAIL'
maintainer 'The Authors'
maintainer_email '[email protected]'
# good
maintainer 'Bob Bobberson'
maintainer_email '[email protected]'

Constant Summary collapse

MSG =
'Metadata contains default maintainer information from the cookbook generator. Add actual cookbook maintainer information to the metadata.rb.'.freeze

Instance Method Summary collapse

Instance Method Details

#on_send(node) ⇒ Object



40
41
42
43
44
# File 'lib/rubocop/cop/chef/correctness/default_maintainer_metadata.rb', line 40

def on_send(node)
  default_metadata?(node) do
    add_offense(node, location: :expression, message: MSG, severity: :refactor)
  end
end