improve style in pattern matcher

This commit is contained in:
Rylan Polster 2020-07-12 14:20:05 -04:00
parent 6119934efb
commit 55246d720e

View File

@ -173,7 +173,8 @@ module RuboCop
# Finds `depends_on "foo" if build.with?("bar")` or `depends_on "foo" if build.without?("bar")`
def_node_search :depends_on_build_with, <<~EOS
(if $(send (send nil? :build) {:with? :without?} str) (send nil? :depends_on str) nil?)
(if $(send (send nil? :build) {:with? :without?} str)
(send nil? :depends_on str) nil?)
EOS
end