Class: RuboCop::Cop::Chef::Effortless::CookbookUsesDatabags

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

Overview

Data bags cannot be used with the Effortless Infra pattern

Examples:


### incorrect
data_bag_item('admins', )
data_bag(data_bag_name)

Constant Summary collapse

MSG =
'Cookbook uses data bags, which cannot be used in the Effortless Infra pattern'
RESTRICT_ON_SEND =
[:data_bag, :data_bag_item].freeze

Instance Method Summary collapse

Methods inherited from Base

#target_chef_version

Instance Method Details

#on_send(node) ⇒ Object



33
34
35
# File 'lib/rubocop/cop/chef/effortless/data_bags.rb', line 33

def on_send(node)
  add_offense(node, severity: :refactor)
end