Merge pull request #13444 from bevanjkay/cask-discontinued

cask/audit: skip additional livecheck audit when cask is discontinued
This commit is contained in:
Bo Anderson 2022-06-19 00:07:31 +01:00 committed by GitHub
commit 300ea666b7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -308,6 +308,7 @@ module Cask
LIVECHECK_REFERENCE_URL = "https://docs.brew.sh/Cask-Cookbook#stanza-livecheck"
def check_hosting_with_livecheck(livecheck_result:)
return if cask.discontinued? || cask.version.latest?
return if block_url_offline? || cask.appcast || cask.livecheckable?
return if livecheck_result == :auto_detected
@ -315,7 +316,6 @@ module Cask
case cask.url.to_s
when %r{sourceforge.net/(\S+)}
return if cask.version.latest?
return unless online?
add_error "Download is hosted on SourceForge, #{add_livecheck}"