Class: RuboCop::Cop::Chef::Modernize::IncludingWindowsDefaultRecipe
- Extended by:
- AutoCorrector
- Includes:
- RangeHelp
- Defined in:
- lib/rubocop/cop/chef/modernize/windows_default_recipe.rb
Overview
Don’t include the windows default recipe that is either full of gem install that are part of the Chef Infra Client, or empty (depends on version).
Constant Summary collapse
- MSG =
'Do not include the Windows default recipe, which only installs win32 gems already included in Chef Infra Client'
- RESTRICT_ON_SEND =
[:include_recipe].freeze
Instance Method Summary collapse
Methods inherited from Base
Instance Method Details
#on_send(node) ⇒ Object
41 42 43 44 45 46 47 |
# File 'lib/rubocop/cop/chef/modernize/windows_default_recipe.rb', line 41 def on_send(node) windows_recipe_usage?(node) do add_offense(node, severity: :refactor) do |corrector| corrector.remove(range_with_surrounding_space(range: node.loc.expression, side: :left)) end end end |