Class: RuboCop::Cop::Chef::ChefModernize::IncludingAptDefaultRecipe
- Inherits:
-
RuboCop::Cop
- Object
- RuboCop::Cop
- RuboCop::Cop::Chef::ChefModernize::IncludingAptDefaultRecipe
- Defined in:
- lib/rubocop/cop/chef/modernize/apt_default_recipe.rb
Overview
Don’t include the apt default recipe to update apt’s package cache when you can use the apt_update resource built into Chef Infra Client 12.7 and later.
Constant Summary collapse
- MSG =
'Do not include the Apt default recipe to update package cache. Instead use the apt_update resource, which is built into Chef Infra Client 12.7 and later.'.freeze
Instance Method Summary collapse
Instance Method Details
#on_send(node) ⇒ Object
40 41 42 43 44 |
# File 'lib/rubocop/cop/chef/modernize/apt_default_recipe.rb', line 40 def on_send(node) apt_recipe_usage?(node) do add_offense(node, location: :expression, message: MSG, severity: :refactor) end end |