From e1f463ff26a13eda48f4fcbaf0049a593d2cb8f0 Mon Sep 17 00:00:00 2001 From: Rylan Polster Date: Wed, 4 Nov 2020 23:42:42 -0500 Subject: [PATCH] audit: use name `tap_audit_exceptions` --- Library/Homebrew/dev-cmd/audit.rb | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/Library/Homebrew/dev-cmd/audit.rb b/Library/Homebrew/dev-cmd/audit.rb index d5dcd16821..053131b6bd 100644 --- a/Library/Homebrew/dev-cmd/audit.rb +++ b/Library/Homebrew/dev-cmd/audit.rb @@ -127,15 +127,15 @@ module Homebrew audit_formulae.sort.each do |f| only = only_cops ? ["style"] : args.only options = { - new_formula: new_formula, - strict: strict, - online: online, - git: git, - only: only, - except: args.except, - spdx_license_data: spdx_license_data, - spdx_exception_data: spdx_exception_data, - audit_exceptions: f.tap.audit_exceptions, + new_formula: new_formula, + strict: strict, + online: online, + git: git, + only: only, + except: args.except, + spdx_license_data: spdx_license_data, + spdx_exception_data: spdx_exception_data, + tap_audit_exceptions: f.tap.audit_exceptions, } options[:style_offenses] = style_offenses.for_path(f.path) if style_offenses options[:display_cop_names] = args.display_cop_names? @@ -248,7 +248,7 @@ module Homebrew @specs = %w[stable head].map { |s| formula.send(s) }.compact @spdx_license_data = options[:spdx_license_data] @spdx_exception_data = options[:spdx_exception_data] - @audit_exceptions = options[:audit_exceptions] + @tap_audit_exceptions = options[:tap_audit_exceptions] end def audit_style @@ -816,7 +816,7 @@ module Homebrew stable_url_minor_version = stable_url_version.minor.to_i formula_suffix = stable.version.patch.to_i - throttled_rate = audit_exception_list("THROTTLED_FORMULAE")[formula.name] + throttled_rate = tap_audit_exception_list(:throttled_formulae)[formula.name] if throttled_rate && formula_suffix.modulo(throttled_rate).nonzero? problem "should only be updated every #{throttled_rate} releases on multiples of #{throttled_rate}" end @@ -1025,9 +1025,9 @@ module Homebrew formula.head && formula.stable.nil? end - def audit_exception_list(list) - if @audit_exceptions.key? list - @audit_exceptions[list] + def tap_audit_exception_list(list) + if @tap_audit_exceptions.key? list + @tap_audit_exceptions[list] else {} end