From a185f3272edf96fc6e65eaf236a61d067270c966 Mon Sep 17 00:00:00 2001 From: commitay Date: Mon, 2 Jul 2018 20:46:28 +1000 Subject: [PATCH] audit: disallow unstable specs for versioned formulae --- Library/Homebrew/dev-cmd/audit.rb | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) 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[