From 629ad219aaae2bb7c3db03ed526734f1dffb9e6d Mon Sep 17 00:00:00 2001
From: Rylan Polster <rslpolster@gmail.com>
Date: Fri, 27 Nov 2020 01:31:14 -0500
Subject: [PATCH] Migrate MAKE_CHECK_ALLOWLIST

---
 Library/Homebrew/rubocops/lines.rb           | 22 +-------------------
 Library/Homebrew/test/rubocops/lines_spec.rb |  2 --
 2 files changed, 1 insertion(+), 23 deletions(-)

diff --git a/Library/Homebrew/rubocops/lines.rb b/Library/Homebrew/rubocops/lines.rb
index ad5c700736..31b78a50db 100644
--- a/Library/Homebrew/rubocops/lines.rb
+++ b/Library/Homebrew/rubocops/lines.rb
@@ -623,33 +623,13 @@ module RuboCop
       #
       # @api private
       class MakeCheck < FormulaCop
-        MAKE_CHECK_ALLOWLIST = %w[
-          beecrypt
-          ccrypt
-          git
-          gmp
-          gnupg
-          gnupg@1.4
-          google-sparsehash
-          jemalloc
-          jpeg-turbo
-          mpfr
-          nettle
-          open-mpi
-          openssl@1.1
-          pcre
-          protobuf
-          wolfssl
-          xz
-        ].freeze
-
         def audit_formula(_node, _class_node, _parent_class_node, body_node)
           return if formula_tap != "homebrew-core"
 
           # Avoid build-time checks in homebrew/core
           find_every_method_call_by_name(body_node, :system).each do |method|
             next if @formula_name.start_with?("lib")
-            next if MAKE_CHECK_ALLOWLIST.include?(@formula_name)
+            next if tap_style_exception? :make_check_allowlist
 
             params = parameters(method)
             next unless node_equals?(params[0], "make")
diff --git a/Library/Homebrew/test/rubocops/lines_spec.rb b/Library/Homebrew/test/rubocops/lines_spec.rb
index 610670ee13..3cb2eade4e 100644
--- a/Library/Homebrew/test/rubocops/lines_spec.rb
+++ b/Library/Homebrew/test/rubocops/lines_spec.rb
@@ -1479,8 +1479,6 @@ describe RuboCop::Cop::FormulaAuditStrict::MakeCheck do
       end
     RUBY
   end
-
-  include_examples "formulae exist", described_class::MAKE_CHECK_ALLOWLIST
 end
 
 describe RuboCop::Cop::FormulaAuditStrict::ShellCommands do
-- 
GitLab