From 6171b51a822d3831973cff3117545cb30984e1cb Mon Sep 17 00:00:00 2001 From: Rylan Polster Date: Thu, 5 Nov 2020 01:26:33 -0500 Subject: [PATCH] audit: migrate VERSIONED_HEAD_SPEC_ALLOWLIST to Homebrew/core --- Library/Homebrew/dev-cmd/audit.rb | 11 +++-------- Library/Homebrew/test/dev-cmd/audit_spec.rb | 1 - 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/Library/Homebrew/dev-cmd/audit.rb b/Library/Homebrew/dev-cmd/audit.rb index abe28d885c..e0ac9f0e1e 100644 --- a/Library/Homebrew/dev-cmd/audit.rb +++ b/Library/Homebrew/dev-cmd/audit.rb @@ -742,11 +742,6 @@ module Homebrew [user, repo] end - VERSIONED_HEAD_SPEC_ALLOWLIST = %w[ - bash-completion@2 - imagemagick@6 - ].freeze - UNSTABLE_ALLOWLIST = { "aalib" => "1.4rc", "automysqlbackup" => "3.0-rc", @@ -817,9 +812,9 @@ module Homebrew return unless @core_tap - if formula.head && @versioned_formula - head_spec_message = "Versioned formulae should not have a `HEAD` spec" - problem head_spec_message unless VERSIONED_HEAD_SPEC_ALLOWLIST.include?(formula.name) + if formula.head && @versioned_formula && + !tap_audit_exception_list(:versioned_head_spec_allowlist).include?(formula.name) + problem "Versioned formulae should not have a `HEAD` spec" end stable = formula.stable diff --git a/Library/Homebrew/test/dev-cmd/audit_spec.rb b/Library/Homebrew/test/dev-cmd/audit_spec.rb index 13b6e14792..12f06d6942 100644 --- a/Library/Homebrew/test/dev-cmd/audit_spec.rb +++ b/Library/Homebrew/test/dev-cmd/audit_spec.rb @@ -868,7 +868,6 @@ module Homebrew end include_examples "formulae exist", described_class::VERSIONED_KEG_ONLY_ALLOWLIST - include_examples "formulae exist", described_class::VERSIONED_HEAD_SPEC_ALLOWLIST include_examples "formulae exist", described_class::PROVIDED_BY_MACOS_DEPENDS_ON_ALLOWLIST include_examples "formulae exist", described_class::UNSTABLE_ALLOWLIST.keys include_examples "formulae exist", described_class::GNOME_DEVEL_ALLOWLIST.keys