audit: don't fail if exception list doesn't exist
This commit is contained in:
parent
869941bccd
commit
55e86125a6
@ -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_exceptions["THROTTLED_FORMULAE"][formula.name]
|
throttled_rate = 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
|
||||||
@ -1024,6 +1024,14 @@ module Homebrew
|
|||||||
def head_only?(formula)
|
def head_only?(formula)
|
||||||
formula.head && formula.stable.nil?
|
formula.head && formula.stable.nil?
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def audit_exception_list(list)
|
||||||
|
if @audit_exceptions.key? list
|
||||||
|
@audit_exceptions[list]
|
||||||
|
else
|
||||||
|
{}
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
class ResourceAuditor
|
class ResourceAuditor
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user