class RuboCop::Cop::Chef::Deprecations::FoodcriticFile

The Foodcritic cookbook linter has been deprecated and should no longer be used for validating cookbooks. Do not include the ‘.foodcritic` config file used by Foodcritic in your cookbooks.

Constants

MSG

Public Instance Methods

on_new_investigation() click to toggle source
# File lib/rubocop/cop/chef/deprecation/foodcritic_file.rb, line 29
def on_new_investigation
  return unless processed_source.path.end_with?('.foodcritic')

  # 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