class RuboCop::Cop::Chef::Deprecations::ResourceOverridesProvidesMethod
Some providers in resources override the provides? method, used to check whether they are a valid provider on the current platform. In Chef
Infra Client 13, this will cause an error. Instead use ‘provides :SOME_PROVIDER_NAME` to register the provider.
@example
### incorrect def provides? true end ### correct provides :SOME_PROVIDER_NAME
Constants
- MSG
Public Instance Methods
Source
# File lib/rubocop/cop/chef/deprecation/resource_overrides_provides_method.rb, line 39 def on_def(node) return unless node.method?(:provides?) add_offense(node, severity: :warning) unless calls_provides?(processed_source.ast) end