aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorMartin Afanasjew2016-06-02 09:36:27 +0200
committerMartin Afanasjew2016-06-02 09:36:27 +0200
commit1c00fed1196ee3fe77604caa96cf97921705917f (patch)
tree1cc2a90a46d512ef902b7032286399c55c5f1595 /Library
parente4d0187120e61bc80d31ebecc3b38f0740b20bb5 (diff)
downloadbrew-1c00fed1196ee3fe77604caa96cf97921705917f.tar.bz2
audit: check Maven Central URLs, prefer redirector (#311)
Should help with being more consistent and makes sure to suggest the HTTPS redirector even if equally valid HTTP URLs for specific hosts or `central.maven.org` are used.
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/cmd/audit.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/Library/Homebrew/cmd/audit.rb b/Library/Homebrew/cmd/audit.rb
index 4a09a69c1..6743f2a46 100644
--- a/Library/Homebrew/cmd/audit.rb
+++ b/Library/Homebrew/cmd/audit.rb
@@ -1269,6 +1269,12 @@ class ResourceAuditor
#{u}
EOS
end
+
+ # Check for Maven Central urls, prefer HTTPS redirector over specific host
+ urls.each do |u|
+ next unless u =~ %r{https?://(?:central|repo\d+)\.maven\.org/maven2/(.+)$}
+ problem "#{u} should be `https://search.maven.org/remotecontent?filepath=#{$1}`"
+ end
end
def problem(text)