lib/rubocop/cop/chef/modernize/apt_default_recipe.rb in cookstyle-6.15.9 vs lib/rubocop/cop/chef/modernize/apt_default_recipe.rb in cookstyle-6.16.4
- old
+ new
@@ -28,11 +28,11 @@
# include_recipe 'apt'
#
# # good
# apt_update
#
- class IncludingAptDefaultRecipe < Cop
+ class IncludingAptDefaultRecipe < Base
extend TargetChefVersion
minimum_target_chef_version '12.7'
MSG = 'Do not include the Apt default recipe to update package cache. Instead use the apt_update resource, which is built into Chef Infra Client 12.7 and later.'
@@ -41,10 +41,10 @@
(send nil? :include_recipe (str {"apt" "apt::default"}))
PATTERN
def on_send(node)
apt_recipe_usage?(node) do
- add_offense(node, location: :expression, message: MSG, severity: :refactor)
+ add_offense(node, message: MSG, severity: :refactor)
end
end
end
end
end