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
commit2eb0065ced3dd9901278c001754fdd0313f85ab8 (patch)
tree2d8213aa6e0b0920ea946cbe5d3020ff1fc99011 /Library/Homebrew/cmd
parent5f5fdb3284b1ff6c961242b1c659ea63ddaf2b67 (diff)
downloadbrew-2eb0065ced3dd9901278c001754fdd0313f85ab8.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