aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cmd
diff options
context:
space:
mode:
authorAdam Vandenberg2011-03-15 21:40:09 -0700
committerAdam Vandenberg2011-03-15 21:40:09 -0700
commitc8508a3b9597c90d28a6362ac280182b3394e8ea (patch)
tree991f7e4904ebef4afe5b2b70f06e6cd2f1a0000c /Library/Homebrew/cmd
parentdf50145319146836b59d474ef867d98a76641203 (diff)
downloadhomebrew-c8508a3b9597c90d28a6362ac280182b3394e8ea.tar.bz2
brew audit: check that homepage includes the protocol
Diffstat (limited to 'Library/Homebrew/cmd')
-rwxr-xr-xLibrary/Homebrew/cmd/audit.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/Library/Homebrew/cmd/audit.rb b/Library/Homebrew/cmd/audit.rb
index f283771e5..3e717115c 100755
--- a/Library/Homebrew/cmd/audit.rb
+++ b/Library/Homebrew/cmd/audit.rb
@@ -144,6 +144,10 @@ end
def audit_formula_urls f
problems = []
+ unless f.homepage =~ %r[^https?://]
+ problems << " * The homepage should start with http or https."
+ end
+
urls = [(f.url rescue nil), (f.head rescue nil)].reject {|p| p.nil?}
# Check SourceForge urls