class RuboCop::Cop::Chef::RedundantCode::SensitivePropertyInResource

Every Chef Infra resource already includes a sensitive property with a default value of false.

@example

#### incorrect property :sensitive, [true, false], default: false

Constants

MSG
RESTRICT_ON_SEND

Public Instance Methods

on_send(node) click to toggle source
# File lib/rubocop/cop/chef/redundant/sensitive_property_in_resource.rb, line 39
def on_send(node)
  return unless sensitive_property?(node)

  add_offense(node, message: MSG, severity: :refactor) do |corrector|
    corrector.remove(node.source_range)
  end
end