audit: handle recommended/optional options better.
This commit is contained in:
parent
8157515b2a
commit
34930586c3
@ -143,8 +143,14 @@ class FormulaAuditor
|
|||||||
end
|
end
|
||||||
|
|
||||||
dep.options.reject do |opt|
|
dep.options.reject do |opt|
|
||||||
# TODO -- fix for :recommended, should still allow --with-xyz
|
next true if dep_f.build.has_option?(opt.name)
|
||||||
dep_f.build.has_option?(opt.name)
|
dep_f.requirements.detect do |r|
|
||||||
|
if r.tags.include? :recommended
|
||||||
|
opt.name == "with-#{r.name}"
|
||||||
|
elsif r.tags.include? :optional
|
||||||
|
opt.name == "without-#{r.name}"
|
||||||
|
end
|
||||||
|
end
|
||||||
end.each do |opt|
|
end.each do |opt|
|
||||||
problem "Dependency #{dep} does not define option #{opt.name.inspect}"
|
problem "Dependency #{dep} does not define option #{opt.name.inspect}"
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user