audit: use name tap_audit_exceptions
This commit is contained in:
parent
55e86125a6
commit
e1f463ff26
@ -127,15 +127,15 @@ module Homebrew
|
|||||||
audit_formulae.sort.each do |f|
|
audit_formulae.sort.each do |f|
|
||||||
only = only_cops ? ["style"] : args.only
|
only = only_cops ? ["style"] : args.only
|
||||||
options = {
|
options = {
|
||||||
new_formula: new_formula,
|
new_formula: new_formula,
|
||||||
strict: strict,
|
strict: strict,
|
||||||
online: online,
|
online: online,
|
||||||
git: git,
|
git: git,
|
||||||
only: only,
|
only: only,
|
||||||
except: args.except,
|
except: args.except,
|
||||||
spdx_license_data: spdx_license_data,
|
spdx_license_data: spdx_license_data,
|
||||||
spdx_exception_data: spdx_exception_data,
|
spdx_exception_data: spdx_exception_data,
|
||||||
audit_exceptions: f.tap.audit_exceptions,
|
tap_audit_exceptions: f.tap.audit_exceptions,
|
||||||
}
|
}
|
||||||
options[:style_offenses] = style_offenses.for_path(f.path) if style_offenses
|
options[:style_offenses] = style_offenses.for_path(f.path) if style_offenses
|
||||||
options[:display_cop_names] = args.display_cop_names?
|
options[:display_cop_names] = args.display_cop_names?
|
||||||
@ -248,7 +248,7 @@ module Homebrew
|
|||||||
@specs = %w[stable head].map { |s| formula.send(s) }.compact
|
@specs = %w[stable head].map { |s| formula.send(s) }.compact
|
||||||
@spdx_license_data = options[:spdx_license_data]
|
@spdx_license_data = options[:spdx_license_data]
|
||||||
@spdx_exception_data = options[:spdx_exception_data]
|
@spdx_exception_data = options[:spdx_exception_data]
|
||||||
@audit_exceptions = options[:audit_exceptions]
|
@tap_audit_exceptions = options[:tap_audit_exceptions]
|
||||||
end
|
end
|
||||||
|
|
||||||
def audit_style
|
def audit_style
|
||||||
@ -816,7 +816,7 @@ module Homebrew
|
|||||||
stable_url_minor_version = stable_url_version.minor.to_i
|
stable_url_minor_version = stable_url_version.minor.to_i
|
||||||
|
|
||||||
formula_suffix = stable.version.patch.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?
|
if throttled_rate && formula_suffix.modulo(throttled_rate).nonzero?
|
||||||
problem "should only be updated every #{throttled_rate} releases on multiples of #{throttled_rate}"
|
problem "should only be updated every #{throttled_rate} releases on multiples of #{throttled_rate}"
|
||||||
end
|
end
|
||||||
@ -1025,9 +1025,9 @@ module Homebrew
|
|||||||
formula.head && formula.stable.nil?
|
formula.head && formula.stable.nil?
|
||||||
end
|
end
|
||||||
|
|
||||||
def audit_exception_list(list)
|
def tap_audit_exception_list(list)
|
||||||
if @audit_exceptions.key? list
|
if @tap_audit_exceptions.key? list
|
||||||
@audit_exceptions[list]
|
@tap_audit_exceptions[list]
|
||||||
else
|
else
|
||||||
{}
|
{}
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user