Remove unnecessary skip since toplevel_stanzas
doesn't look in blocks
Co-authored-by: Markus Reiter <me@reitermark.us>
This commit is contained in:
parent
7a4a579847
commit
794cd37dbb
@ -25,8 +25,6 @@ module RuboCop
|
|||||||
cask_stanzas.each do |stanza|
|
cask_stanzas.each do |stanza|
|
||||||
# Skip if the stanza is itself an `on_*` block.
|
# Skip if the stanza is itself an `on_*` block.
|
||||||
next if ON_SYSTEM_METHODS.include?(stanza.stanza_name)
|
next if ON_SYSTEM_METHODS.include?(stanza.stanza_name)
|
||||||
# Skip if the stanza we detect is already in an `on_*` block.
|
|
||||||
next if stanza.parent_node.block_type? && ON_SYSTEM_METHODS.include?(stanza.parent_node.method_name)
|
|
||||||
# Skip if the stanza outside of a block is not also in an `on_*` block.
|
# Skip if the stanza outside of a block is not also in an `on_*` block.
|
||||||
next unless stanzas_in_blocks.include?(stanza.stanza_name)
|
next unless stanzas_in_blocks.include?(stanza.stanza_name)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user