class RuboCop::Cop::Chef::Deprecations::DependsOnChefReportingCookbook

Don’t depend on the chef-reporting cookbook made obsolete by Chef Infra Client 11.6. This cookbook installs a gem that is not compatible with newer Chef Infra Client releases.

@example

#### incorrect
depends 'chef-reporting'

Constants

MSG
RESTRICT_ON_SEND

Public Instance Methods

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