Class: RuboCop::Cop::Chef::Deprecations::LibrarianChefSpec

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

Overview

The Librarian-Chef depsolving project is no longer maintained and a Cheffile should not be used for cookbook depsolving. Consider using Policyfiles instead.

Examples:


### incorrect
require 'chefspec/librarian'

Constant Summary collapse

MSG =
'The Librarian-Chef depsolving project is no longer maintained and ChefSpec should not use Librarian-Chef for cookbook depsolving. Consider using Policyfiles instead.'
RESTRICT_ON_SEND =
[:require].freeze

Instance Method Summary collapse

Methods inherited from Base

#target_chef_version

Instance Method Details

#on_send(node) ⇒ Object



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

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

  add_offense(node, severity: :warning)
end