Class: RuboCop::Cop::Chef::Deprecations::Cheffile

Inherits:
Base
  • Object
show all
Includes:
RangeHelp
Defined in:
lib/rubocop/cop/chef/deprecation/cheffile.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. If the Policyfiles model is not compatible with your workflow you may find Berkshelf offers a more similar, and still supported, experience to Librarian-Chef.

Constant Summary collapse

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

Instance Method Summary collapse

Methods inherited from Base

#target_chef_version

Instance Method Details

#on_new_investigationObject



29
30
31
32
33
34
# File 'lib/rubocop/cop/chef/deprecation/cheffile.rb', line 29

def on_new_investigation
  # Using range similar to RuboCop::Cop::Naming::Filename (file_name.rb)
  range = source_range(processed_source.buffer, 1, 0)

  add_offense(range, severity: :warning)
end