Skip to content
Snippets Groups Projects
Commit 629ad219 authored by Rylan Polster's avatar Rylan Polster
Browse files

Migrate MAKE_CHECK_ALLOWLIST

parent e823dd71
No related branches found
No related tags found
No related merge requests found
......@@ -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")
......
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment