Class: RuboCop::Cop::Chef::Effortless::CookbookUsesEnvironments
- Defined in:
- lib/rubocop/cop/chef/effortless/node_environment.rb
Overview
Neither Policyfiles or Effortless Infra which is based on Policyfiles supports Chef Environments
Constant Summary collapse
- MSG =
'Cookbook uses environments, which cannot be used in Policyfiles or Effortless Infra'
- RESTRICT_ON_SEND =
[:environment, :chef_environment].freeze
Instance Method Summary collapse
Methods inherited from Base
Instance Method Details
#on_send(node) ⇒ Object
34 35 36 37 38 39 40 |
# File 'lib/rubocop/cop/chef/effortless/node_environment.rb', line 34 def on_send(node) if node.receiver && node.receiver.send_type? && node.receiver.method?(:node) add_offense(node, severity: :refactor) end end |