Class: RuboCop::Cop::Chef::Sharing::DefaultMetadataMaintainer

Inherits:
Base
  • Object
show all
Defined in:
lib/rubocop/cop/chef/sharing/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:


### incorrect
maintainer 'YOUR_COMPANY_NAME'
maintainer_email 'YOUR_EMAIL'
maintainer 'The Authors'
maintainer_email 'you@example.com'
### correct
maintainer 'Bob Bobberson'
maintainer_email 'bob@bobberson.com'

Constant Summary collapse

MSG =
'Metadata contains default maintainer information from the cookbook generator. Add actual cookbook maintainer information to the metadata.rb.'
RESTRICT_ON_SEND =
[:maintainer, :maintainer_email].freeze

Instance Method Summary collapse

Methods inherited from Base

#target_chef_version

Instance Method Details

#on_send(node) ⇒ Object



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

def on_send(node)
  default_metadata?(node) do
    add_offense(node, severity: :refactor)
  end
end