diff --git a/Library/Homebrew/dev-cmd/audit.rb b/Library/Homebrew/dev-cmd/audit.rb index 56a7bb233a..73788068f2 100644 --- a/Library/Homebrew/dev-cmd/audit.rb +++ b/Library/Homebrew/dev-cmd/audit.rb @@ -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[