cask/audit: Skip livecheck audit for :latest casks

This commit is contained in:
Sam Ford 2022-06-18 16:44:29 -04:00
parent fa2e4d4401
commit 8bce1e8e37
No known key found for this signature in database
GPG Key ID: 7AF5CBEE1DD6F76D

View File

@ -308,14 +308,14 @@ module Cask
LIVECHECK_REFERENCE_URL = "https://docs.brew.sh/Cask-Cookbook#stanza-livecheck"
def check_hosting_with_livecheck(livecheck_result:)
return if block_url_offline? || cask.appcast || cask.livecheckable? || cask.discontinued?
return if cask.discontinued? || cask.version.latest?
return if block_url_offline? || cask.appcast || cask.livecheckable?
return if livecheck_result == :auto_detected
add_livecheck = "please add a livecheck. See #{Formatter.url(LIVECHECK_REFERENCE_URL)}"
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}"