audit: disallow unstable specs for versioned formulae

This commit is contained in:
commitay 2018-07-02 20:46:28 +10:00
parent 44a78a12a9
commit a185f3272e

View File

@ -571,8 +571,19 @@ module Homebrew
end
end
if @new_formula && formula.head
new_formula_problem "Formulae should not have a HEAD spec"
if formula.head || formula.devel
unstable_spec_message = "Formulae should not have an unstable spec"
if @new_formula
new_formula_problem unstable_spec_message
elsif formula.versioned_formula?
versioned_unstable_spec = %w[
bash-completion@2
imagemagick@6
openssl@1.1
python@2
]
problem unstable_spec_message unless versioned_unstable_spec.include?(formula.name)
end
end
throttled = %w[