Class: RuboCop::Cop::Chef::Deprecations::EOLAuditModeUsage

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

Overview

The beta Audit Mode for Chef Infra Client was removed in Chef Infra Client 15.0. Users should instead use InSpec and the audit cookbook or the Compliance Phase introduced in Chef Infra Client 17. See www.inspec.io/ for more information.

Examples:


### incorrect
control_group 'Baseline' do
  control 'SSH' do
    it 'should be listening on port 22' do
      expect(port(22)).to be_listening
    end
  end
end

Constant Summary collapse

MSG =
'The beta Audit Mode feature in Chef Infra Client was removed in Chef Infra Client 15.0.'
RESTRICT_ON_SEND =
[:control_group].freeze

Instance Method Summary collapse

Methods inherited from Base

#target_chef_version

Instance Method Details

#on_send(node) ⇒ Object



40
41
42
43
44
# File 'lib/rubocop/cop/chef/deprecation/eol_audit_mode.rb', line 40

def on_send(node)
  control_group?(node) do
    add_offense(node.loc.selector, severity: :warning)
  end
end