audit: don't allow openssl & libressl dependency.

Formulae should not depend on both OpenSSL and LibreSSL (even
optionally). This is to avoid descending into madness where every
formulae that could use LibreSSL has to have option and switching logic.

Homebrew has standardised on OpenSSL and will do so everywhere that
LibreSSL is not a hard requirement.
This commit is contained in:
Mike McQuaid 2016-12-29 11:46:49 +00:00
parent aaf70eb696
commit 8ffe231f44

View File

@ -788,6 +788,10 @@ class FormulaAuditor
problem "Please set plist_options when using a formula-defined plist."
end
if text =~ /depends_on\s+['"]openssl['"]/ && text =~ /depends_on\s+['"]libressl['"]/
problem "Formulae should not depend on both OpenSSL and LibreSSL (even optionally)."
end
return unless text.include?('require "language/go"') && !text.include?("go_resource")
problem "require \"language/go\" is unnecessary unless using `go_resource`s"
end