Class: RuboCop::Cop::Chef::Deprecations::IncludingXMLRubyRecipe
- Extended by:
- AutoCorrector
- Defined in:
- lib/rubocop/cop/chef/deprecation/xml_ruby_recipe.rb
Overview
Do not include the deprecated xml::ruby recipe to install the nokogiri gem. Chef Infra Client 12 and later ships with nokogiri included.
Constant Summary collapse
- MSG =
'Do not include the deprecated xml::ruby recipe to install the nokogiri gem. Chef Infra Client 12 and later ships with nokogiri included.'
- RESTRICT_ON_SEND =
[:include_recipe].freeze
Instance Method Summary collapse
Methods inherited from Base
Instance Method Details
#on_send(node) ⇒ Object
39 40 41 42 43 44 45 46 |
# File 'lib/rubocop/cop/chef/deprecation/xml_ruby_recipe.rb', line 39 def on_send(node) xml_ruby_recipe?(node) do node = node.parent if node.parent&.conditional? && node.parent&.single_line_condition? # make sure we catch any inline conditionals add_offense(node, severity: :warning) do |corrector| corrector.remove(node) end end end |