lib/rubocop/cop/chef/modernize/zipfile_resource.rb in cookstyle-6.15.9 vs lib/rubocop/cop/chef/modernize/zipfile_resource.rb in cookstyle-6.16.4
- old
+ new
@@ -27,11 +27,11 @@
# # bad
# zipfile "C:\file.zip" do
# path 'C:\expand_here'
# end
#
- class ZipfileResource < Cop
+ class ZipfileResource < Base
include RuboCop::Chef::CookbookHelpers
extend TargetChefVersion
minimum_target_chef_version '15.0'
@@ -41,16 +41,16 @@
(send nil? :depends (str "zipfile"))
PATTERN
def on_send(node)
depends_zipfile?(node) do
- add_offense(node, location: :expression, message: MSG, severity: :refactor)
+ add_offense(node, message: MSG, severity: :refactor)
end
end
def on_block(node)
match_resource_type?(:zipfile, node) do
- add_offense(node, location: :expression, message: MSG, severity: :refactor)
+ add_offense(node, message: MSG, severity: :refactor)
end
end
end
end
end