From 2805531f13964cb2bb0885277ef1ce094d4314b3 Mon Sep 17 00:00:00 2001 From: Andrew Janke Date: Tue, 3 May 2016 08:16:20 -0400 Subject: [PATCH] audit: fix false-positive for '--with-check' from 'depends_on "check" => :optional' (#188) Fixes #170 --- Library/Homebrew/cmd/audit.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Library/Homebrew/cmd/audit.rb b/Library/Homebrew/cmd/audit.rb index b97e5610ee..a307a83498 100644 --- a/Library/Homebrew/cmd/audit.rb +++ b/Library/Homebrew/cmd/audit.rb @@ -391,7 +391,9 @@ class FormulaAuditor end if o.name =~ /^with(out)?-(?:checks?|tests)$/ - problem "Use '--with#{$1}-test' instead of '--#{o.name}'. Migrate '--#{o.name}' with `deprecated_option`." + unless formula.deps.any? { |d| d.name == "check" && (d.optional? || d.recommended?) } + problem "Use '--with#{$1}-test' instead of '--#{o.name}'. Migrate '--#{o.name}' with `deprecated_option`." + end end end end