Class: RuboCop::Cop::Chef::RedundantCode::GroupingMetadata
- Extended by:
- AutoCorrector
- Includes:
- RangeHelp, RuboCop::Chef::AutocorrectHelpers
- Defined in:
- lib/rubocop/cop/chef/redundant/grouping_metadata.rb
Overview
The grouping metadata.rb method is not used and is unnecessary in cookbooks.
Constant Summary collapse
- MSG =
'The grouping metadata.rb method is not used and is unnecessary in cookbooks.'
- RESTRICT_ON_SEND =
[:grouping].freeze
Instance Method Summary collapse
Methods included from RuboCop::Chef::AutocorrectHelpers
#expression_including_heredocs
Methods inherited from Base
Instance Method Details
#on_send(node) ⇒ Object
37 38 39 40 41 |
# File 'lib/rubocop/cop/chef/redundant/grouping_metadata.rb', line 37 def on_send(node) add_offense(node, severity: :refactor) do |corrector| corrector.remove(range_with_surrounding_space(range: expression_including_heredocs(node), side: :left)) end end |