class RuboCop::Cop::Chef::Modernize::UseBuildEssentialResource
Use the build_essential resource from the build-essential cookbook 5.0+ or Chef
Infra Client 14+ instead of using the build-essential::default recipe.
@example
#### incorrect depends 'build-essential' include_recipe 'build-essential::default' include_recipe 'build-essential' #### correct build_essential 'install compilation tools'
Constants
- MSG
- RESTRICT_ON_SEND
Public Instance Methods
on_send(node)
click to toggle source
# File lib/rubocop/cop/chef/modernize/build_essential.rb, line 44 def on_send(node) build_essential_recipe_usage?(node) do add_offense(node, severity: :refactor) do |corrector| corrector.replace(node, "build_essential 'install compilation tools'") end end end