Class: RuboCop::Cop::Chef::ChefModernize::SevenZipArchiveResource

Inherits:
RuboCop::Cop
  • Object
show all
Defined in:
lib/rubocop/cop/chef/modernize/seven_zip_archive.rb

Overview

Use the archive_file resource built into Chef Infra Client 15+ instead of the seven_zip_archive

Examples:


# bad
seven_zip_archive "C:\file.zip" do
  path 'C:\expand_here'
end

Constant Summary collapse

MSG =
'Use the archive_file resource built into Chef Infra Client 15+ instead of the seven_zip_archive'.freeze

Instance Method Summary collapse

Instance Method Details

#on_send(node) ⇒ Object



34
35
36
# File 'lib/rubocop/cop/chef/modernize/seven_zip_archive.rb', line 34

def on_send(node)
  add_offense(node, location: :expression, message: MSG, severity: :refactor) if node.method_name == :seven_zip_archive
end