Class: RuboCop::Cop::Chef::Correctness::PropertyWithoutType
- Defined in:
- lib/rubocop/cop/chef/correctness/property_without_type.rb
Overview
Resource properties or attributes should always define a type to help users understand the correct allowed values.
Constant Summary collapse
- MSG =
'Resource properties or attributes should always define a type to help users understand the correct allowed values.'
- RESTRICT_ON_SEND =
[:property, :attribute].freeze
Instance Method Summary collapse
Methods inherited from Base
Instance Method Details
#on_send(node) ⇒ Object
48 49 50 51 52 53 54 |
# File 'lib/rubocop/cop/chef/correctness/property_without_type.rb', line 48 def on_send(node) property_without_type?(node) do |hash_vals| return if hash_vals&.first&.keys&.include?(s(:sym, :kind_of)) add_offense(node, severity: :refactor) end end |