audit: fix false-positive for '--with-check' from 'depends_on "check" => :optional' (#188)

Fixes #170
This commit is contained in:
Andrew Janke 2016-05-03 08:16:20 -04:00
parent 066489a2b3
commit 2805531f13

View File

@ -391,10 +391,12 @@ class FormulaAuditor
end
if o.name =~ /^with(out)?-(?:checks?|tests)$/
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
def audit_desc
# For now, only check the description when using `--strict`