Warn about duplicated URLs

Closes Homebrew/homebrew#39486.
This commit is contained in:
Jack Nagel 2015-05-07 22:14:56 -04:00
parent 5c414dca5b
commit 5c8ceaa458

View File

@ -321,8 +321,15 @@ class FormulaAuditor
problem "\"http://ftpmirror.gnu.org\" is preferred for GNU software (url is #{u})."
end
mirrors = @specs.map(&:mirrors).flatten
dupes = urls & mirrors
dupes.each do |dupe|
problem "URL should not be duplicated as a mirror: #{dupe}"
end
# the rest of the checks apply to mirrors as well.
urls.concat(@specs.map(&:mirrors).flatten)
urls += mirrors
# Check a variety of SSL/TLS links that don't consistently auto-redirect
# or are overly common errors that need to be reduced & fixed over time.