audit: do not warn about reachability of brew mirrored URL

A `brew mirror`ed URL is usually not yet reachable at the time of pull request.
This commit is contained in:
Zhiming Wang 2017-03-04 10:06:47 -05:00
parent 56ee2460f1
commit 475cade1a3
No known key found for this signature in database
GPG Key ID: 5B58F95EC95965D8

View File

@ -1566,6 +1566,9 @@ class ResourceAuditor
strategy = DownloadStrategyDetector.detect(url, using) strategy = DownloadStrategyDetector.detect(url, using)
if strategy <= CurlDownloadStrategy && !url.start_with?("file") if strategy <= CurlDownloadStrategy && !url.start_with?("file")
# A `brew mirror`'ed URL is usually not yet reachable at the time of
# pull request.
next if url =~ %r{^https://dl.bintray.com/homebrew/mirror/}
if http_content_problem = FormulaAuditor.check_http_content(url) if http_content_problem = FormulaAuditor.check_http_content(url)
problem http_content_problem problem http_content_problem
end end