class RuboCop::Cop::Chef::RedundantCode::AttributeMetadata
The attribute metadata.rb method is not used and is unnecessary in cookbooks.
@example
#### incorrect in metadata.rb: attribute 'zookeeper_bridge/server', display_name: 'zookeeper server', description: 'Zookeeper server address.', type: 'string', required: 'optional', default: '"127.0.0.1:2181"'
Constants
- MSG
- RESTRICT_ON_SEND
Public Instance Methods
on_send(node)
click to toggle source
# File lib/rubocop/cop/chef/redundant/attribute_metadata.rb, line 43 def on_send(node) add_offense(node, message: MSG, severity: :refactor) do |corrector| corrector.remove(range_with_surrounding_space(range: expression_including_heredocs(node), side: :left)) end end