lib/rubocop/cop/chef/deprecation/run_command_helper.rb in cookstyle-6.16.4 vs lib/rubocop/cop/chef/deprecation/run_command_helper.rb in cookstyle-6.16.7
- old
+ new
@@ -33,9 +33,10 @@
# # good
# shell_out!('/bin/foo')
#
class UsesRunCommandHelper < Base
MSG = "Use 'shell_out!' instead of the legacy 'run_command' or 'run_command_with_systems_locale' helpers for shelling out. The run_command helper was removed in Chef Infra Client 13."
+ RESTRICT_ON_SEND = [:require, :run_command, :run_command_with_systems_locale, :include].freeze
def_node_matcher :calls_run_command?, '(send nil? {:run_command :run_command_with_systems_locale} ...)'
def_node_matcher :require_mixin_command?, '(send nil? :require (str "chef/mixin/command"))'
def_node_matcher :include_mixin_command?, '(send nil? :include (const (const (const nil? :Chef) :Mixin) :Command))'