Class: RuboCop::Cop::Chef::Effortless::CookbookUsesSearch

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

Overview

Search is not compatible with the Effortless Infra pattern

Examples:


### incorrect
search(:node, 'run_list:recipe\[bacula\:\:server\]')

Constant Summary collapse

MSG =
'Cookbook uses search, which cannot be used in the Effortless Infra pattern'
RESTRICT_ON_SEND =
[:search].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/search_used.rb', line 33

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