rubocops/cask: Check ON_SYSTEM_METHODS instead of STANZA_ORDER
- This is already here and used in multiple places. Continuing to use `STANZA_ORDER` will break this cop when we add `ON_SYSTEM_METHODS` to that list.
This commit is contained in:
parent
ff2fad6bcf
commit
2c5165850a
@ -21,7 +21,7 @@ module RuboCop
|
||||
|
||||
cask_stanzas.each do |stanza|
|
||||
# Skip if the stanza is itself an `on_*` block.
|
||||
next unless RuboCop::Cask::Constants::STANZA_ORDER.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.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user