Class: RuboCop::Cop::Chef::Deprecations::UseAutomaticResourceName
- Extended by:
- AutoCorrector
- Includes:
- RangeHelp
- Defined in:
- lib/rubocop/cop/chef/deprecation/use_automatic_resource_name.rb
Overview
The use_automatic_resource_name method was removed in Chef Infra Client 16. The resource name/provides should be set explicitly instead.
Constant Summary collapse
- MSG =
'The use_automatic_resource_name method was removed in Chef Infra Client 16. The resource name/provides should be set explicitly instead.'
- RESTRICT_ON_SEND =
[:use_automatic_resource_name].freeze
Instance Method Summary collapse
Methods inherited from Base
Instance Method Details
#on_send(node) ⇒ Object
43 44 45 46 47 |
# File 'lib/rubocop/cop/chef/deprecation/use_automatic_resource_name.rb', line 43 def on_send(node) add_offense(node.loc.selector, severity: :warning) do |corrector| corrector.remove(range_with_surrounding_space(range: node.loc.expression, side: :left)) end end |