audit: fix false-positive for '--with-check' from 'depends_on "check" => :optional' (#188)
Fixes #170
This commit is contained in:
parent
066489a2b3
commit
2805531f13
@ -391,10 +391,12 @@ class FormulaAuditor
|
|||||||
end
|
end
|
||||||
|
|
||||||
if o.name =~ /^with(out)?-(?:checks?|tests)$/
|
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`."
|
problem "Use '--with#{$1}-test' instead of '--#{o.name}'. Migrate '--#{o.name}' with `deprecated_option`."
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
def audit_desc
|
def audit_desc
|
||||||
# For now, only check the description when using `--strict`
|
# For now, only check the description when using `--strict`
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user