Class: RuboCop::Cop::Chef::Deprecations::FoodcriticTesting

Inherits:
Base
  • Object
show all
Defined in:
lib/rubocop/cop/chef/deprecation/foodcritic_testing.rb

Overview

The Foodcritic cookbook linter has been deprecated and should no longer be used for validating cookbooks.

Examples:


### incorrect
gem 'foodcritic'
require 'foodcritic'

Constant Summary collapse

MSG =
'The Foodcritic cookbook linter has been deprecated and should no longer be used for validating cookbooks.'
RESTRICT_ON_SEND =
[:require, :gem].freeze

Instance Method Summary collapse

Methods inherited from Base

#target_chef_version

Instance Method Details

#on_send(node) ⇒ Object



34
35
36
37
38
# File 'lib/rubocop/cop/chef/deprecation/foodcritic_testing.rb', line 34

def on_send(node)
  return unless node.arguments.first == s(:str, 'foodcritic')

  add_offense(node, severity: :warning)
end