diff options
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/cmd/audit.rb | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/Library/Homebrew/cmd/audit.rb b/Library/Homebrew/cmd/audit.rb index 6dd70cd67..78a65952b 100644 --- a/Library/Homebrew/cmd/audit.rb +++ b/Library/Homebrew/cmd/audit.rb @@ -181,19 +181,21 @@ class FormulaAuditor end def audit_urls - unless f.homepage =~ %r[^https?://] - problem "The homepage should start with http or https (url is #{f.homepage})." + homepage = f.homepage + + unless homepage =~ %r[^https?://] + problem "The homepage should start with http or https (URL is #{homepage})." end # Check for http:// GitHub homepage urls, https:// is preferred. # Note: only check homepages that are repo pages, not *.github.com hosts - if f.homepage =~ %r[^http://github\.com/] - problem "Use https:// URLs for homepages on GitHub (url is #{f.homepage})." + if homepage =~ %r[^http://github\.com/] + problem "Use https:// URLs for homepages on GitHub (URL is #{homepage})." end # Google Code homepages should end in a slash - if f.homepage =~ %r[^https?://code\.google\.com/p/[^/]+[^/]$] - problem "Google Code homepage should end with a slash (url is #{f.homepage})." + if homepage =~ %r[^https?://code\.google\.com/p/[^/]+[^/]$] + problem "Google Code homepage should end with a slash (URL is #{homepage})." end urls = @specs.map(&:url) |
