Class: RuboCop::Cop::Chef::ChefDeprecations::Cheffile
- Inherits:
-
RuboCop::Cop
- Object
- RuboCop::Cop
- RuboCop::Cop::Chef::ChefDeprecations::Cheffile
- Includes:
- RangeHelp
- Defined in:
- lib/rubocop/cop/chef/deprecation/cheffile.rb
Constant Summary collapse
- MSG =
'The Libarian-Chef depsolving project is no longer maintained and a Cheffile should not be used for cookbook depsolving. Consider using Policyfiles instead.'.freeze
Instance Method Summary collapse
Instance Method Details
#investigate(processed_source) ⇒ Object
29 30 31 32 33 34 35 36 |
# File 'lib/rubocop/cop/chef/deprecation/cheffile.rb', line 29 def investigate(processed_source) return if processed_source.blank? # Using range similar to RuboCop::Cop::Naming::Filename (file_name.rb) range = source_range(processed_source.buffer, 1, 0) add_offense(nil, location: range, message: MSG, severity: :refactor) end |