Class: RuboCop::Cop::Chef::RedundantCode::ReplacesMetadata
- Extended by:
- AutoCorrector
- Includes:
- RangeHelp
- Defined in:
- lib/rubocop/cop/chef/redundant/replaces_metadata.rb
Overview
The replaces metadata.rb method is not used and is unnecessary in cookbooks. Replacements for existing cookbooks should be documented in the cookbook’s README.md file instead.
Constant Summary collapse
- MSG =
'The replaces metadata.rb method is not used and is unnecessary in cookbooks.'
- RESTRICT_ON_SEND =
[:replaces].freeze
Instance Method Summary collapse
Methods inherited from Base
Instance Method Details
#on_send(node) ⇒ Object
37 38 39 40 41 |
# File 'lib/rubocop/cop/chef/redundant/replaces_metadata.rb', line 37 def on_send(node) add_offense(node, severity: :refactor) do |corrector| corrector.remove(range_with_surrounding_space(range: node.loc.expression, side: :left)) end end |