aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew
diff options
context:
space:
mode:
authorAndrew Janke2016-05-03 08:16:20 -0400
committerAndrew Janke2016-05-03 08:16:20 -0400
commit2805531f13964cb2bb0885277ef1ce094d4314b3 (patch)
tree3b83360740d54777cf97956b3fcb11b09a38b45a /Library/Homebrew
parent066489a2b34e710c4bb847c4bbdc5aea0635daac (diff)
downloadbrew-2805531f13964cb2bb0885277ef1ce094d4314b3.tar.bz2
audit: fix false-positive for '--with-check' from 'depends_on "check" => :optional' (#188)
Fixes #170
Diffstat (limited to 'Library/Homebrew')
-rw-r--r--Library/Homebrew/cmd/audit.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/Library/Homebrew/cmd/audit.rb b/Library/Homebrew/cmd/audit.rb
index b97e5610e..a307a8349 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