class RuboCop::Cop::Chef::Deprecations::ChefHandlerRecipe

There is no need to include the empty and deprecated chef_handler::default recipe to use the chef_handler resource

@example

#### incorrect
include_recipe 'chef_handler'
include_recipe 'chef_handler::default'

Constants

MSG
RESTRICT_ON_SEND

Public Instance Methods

on_send(node) click to toggle source
# File lib/rubocop/cop/chef/deprecation/chef_handler_recipe.rb, line 41
def on_send(node)
  chef_handler_recipe?(node) do
    add_offense(node, message: MSG, severity: :refactor) do |corrector|
      corrector.remove(range_with_surrounding_space(range: node.loc.expression, side: :left))
    end
  end
end