diff --git a/Library/Homebrew/rubocops/lines.rb b/Library/Homebrew/rubocops/lines.rb index 638dac44099a6..579efd258a6bf 100644 --- a/Library/Homebrew/rubocops/lines.rb +++ b/Library/Homebrew/rubocops/lines.rb @@ -938,7 +938,7 @@ def audit_formula(formula_nodes) end end - [:build, [:build, :test]].each do |type| + [:build, [:build, :test], [:test, :build]].each do |type| find_method_with_args(body_node, :depends_on, "rustup" => type) do problem "Formulae in homebrew/core should use 'depends_on \"rust\" => #{type}' " \ "instead of '#{@offensive_node.source}'." do |corrector|