Class: RuboCop::Cop::Chef::ChefDeprecations::EOLAuditModeUsage

Inherits:
RuboCop::Cop
  • 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. See www.inspec.io/ for more informmation.

Examples:


# bad
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. Users should instead use InSpec and the audit cookbook. See https://www.inspec.io/ for more informmation.'.freeze

Instance Method Summary collapse

Instance Method Details

#on_send(node) ⇒ Object



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

def on_send(node)
  control_group?(node) do
    add_offense(node, location: :selector, message: MSG, severity: :refactor)
  end
end