Class: RuboCop::Cop::Chef::ChefEffortless::CookbookUsesDatabags
- Inherits:
-
RuboCop::Cop
- Object
- RuboCop::Cop
- RuboCop::Cop::Chef::ChefEffortless::CookbookUsesDatabags
- Defined in:
- lib/rubocop/cop/chef/effortless/data_bags.rb
Overview
Data bags cannot be used with the Effortless Infra pattern
Constant Summary collapse
- MSG =
'Cookbook uses data bags, which cannot be used in the Effortless Infra pattern'.freeze
Instance Method Summary collapse
Instance Method Details
#on_send(node) ⇒ Object
31 32 33 |
# File 'lib/rubocop/cop/chef/effortless/data_bags.rb', line 31 def on_send(node) add_offense(node, location: :expression, message: MSG, severity: :refactor) if %i(data_bag data_bag_item).include?(node.method_name) end |