Class: RuboCop::Cop::Chef::Deprecations::Delivery

Inherits:
Base
  • Object
show all
Includes:
RangeHelp
Defined in:
lib/rubocop/cop/chef/deprecation/delivery.rb

Overview

The Delivery CLI from Chef Delivery/Workflow is no longer bundled with Chef Workstation as Chef Delivery is end of life as of Dec 31st 2021.

Users of Delivery / Workflow would include a ‘.delivery` directory in their cookbooks. This directory would include Delivery local-mode configs or Delivery cookbooks. The contents of this directory are now obsolete and should be removed.

Constant Summary collapse

MSG =
'Do not include Chef Delivery (Workflow) configuration in your cookbooks. It went EOL Dec 31st 2021 and the delivery command was removed from Chef Workstation Feb 2022.'

Instance Method Summary collapse

Methods inherited from Base

#target_chef_version

Instance Method Details

#on_other_fileObject Also known as: on_new_investigation



32
33
34
35
36
37
38
39
# File 'lib/rubocop/cop/chef/deprecation/delivery.rb', line 32

def on_other_file
  return unless processed_source.path.end_with?('/.delivery/project.toml', '/.delivery/config.json')

  # 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