class RuboCop::Cop::Chef::Effortless::ChefVaultUsed

Chef Vault is not supported in the Effortless pattern, so usage of Chef Vault must be shifted to another secrets management solution before leveraging the Effortless pattern.

@example

#### incorrect
require 'chef-vault'

#### incorrect
ChefVault::Item

#### incorrect
include_recipe 'chef-vault'

#### incorrect
chef_gem 'chef-vault'

#### incorrect
chef_vault_item_for_environment(arg, arg1)

#### incorrect
chef_vault_item(arg, arg1)

Constants

MSG
RESTRICT_ON_SEND

Public Instance Methods

on_const(node) click to toggle source
# File lib/rubocop/cop/chef/effortless/chef_vault_used.rb, line 78
def on_const(node)
  vault_const?(node) do
    add_offense(node.loc.expression, message: MSG, severity: :refactor)
  end
end
on_send(node) click to toggle source
# File lib/rubocop/cop/chef/effortless/chef_vault_used.rb, line 71
def on_send(node)
  return unless require?(node) ||
                chef_vault_item_for_environment?(node) ||
                chef_vault_item?(node)
  add_offense(node.loc.expression, message: MSG, severity: :refactor)
end