Class: RuboCop::Cop::Chef::Correctness::MetadataMalformedDepends
- Extended by:
- AutoCorrector
- Defined in:
- lib/rubocop/cop/chef/correctness/metadata_malformed_version.rb
Overview
metadata.rb cookbook dependencies and version constraints should be comma separated.
Constant Summary collapse
- RESTRICT_ON_SEND =
[:depends].freeze
- MSG =
'metadata.rb cookbook dependencies and version constraints should be comma separated'
Instance Method Summary collapse
Methods inherited from Base
Instance Method Details
#on_send(node) ⇒ Object
47 48 49 50 51 52 53 |
# File 'lib/rubocop/cop/chef/correctness/metadata_malformed_version.rb', line 47 def on_send(node) depends_without_comma?(node) do |cb, ver| add_offense(node, severity: :refactor) do |corrector| corrector.replace(node, "depends '#{cb.value}', '#{ver.value}'") end end end |