Class: RuboCop::Cop::Chef::ChefEffortless::CookbookUsesSearch
- Inherits:
-
RuboCop::Cop
- Object
- RuboCop::Cop
- RuboCop::Cop::Chef::ChefEffortless::CookbookUsesSearch
- Defined in:
- lib/rubocop/cop/chef/effortless/search_used.rb
Overview
Search is not compatible with the Effortless Infra pattern
Constant Summary collapse
- MSG =
'Cookbook uses search, 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/search_used.rb', line 31 def on_send(node) add_offense(node, location: :expression, message: MSG, severity: :refactor) if node.method_name == :search end |