Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
brew style
with your changes locally?brew typecheck
with your changes locally?brew tests
with your changes locally?Some formulae/casks contain duplicate checkable URLs or contain URLs that become duplicates after
#preprocess_url
is used. With the former, a formula'sstable
andhead
URLs can be the same if they both use the Git repository. With the latter, a formula'shomepage
andstable
URLs are different but#preprocess_url
can return the same Git repository URL for each (which can also be a duplicate of thehead
URL).The
fabric-completion
formula is a worst case scenario, as it contains both of these conditions but the repository has no tags. By default, livecheck would needlessly check the repository three times (i.e., no versions are found so livecheck tries the next URL, which happens to be the same URL). [That said, I added askip
livecheck
block in the past when I noticed this issue.]This PR avoids duplicate URLs in
#checkable_urls
and keeps track of checked URLs in#latest_version
to avoid a duplicate caused by#preprocess_url
. This should effectively resolve the issue of checking the same URL more than once for a given formula/cask. Checking the same URL only once across all the formulae/casks in a given livecheck run will be handled in a later PR (though I've done most of the groundwork already in previous PRs).