aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cmd
diff options
context:
space:
mode:
authorAdam Vandenberg2013-05-27 22:24:22 -0700
committerAdam Vandenberg2013-05-27 22:25:34 -0700
commit577cb5a2b2631439609c3c815db82f3d201a077b (patch)
tree84f26aa11c68a1190869c0816043ad76805edd89 /Library/Homebrew/cmd
parente5a848b3728b3688c5a8c32b72c6559cf3025ac9 (diff)
downloadhomebrew-577cb5a2b2631439609c3c815db82f3d201a077b.tar.bz2
Audit url/devel/head for redundant :using
Diffstat (limited to 'Library/Homebrew/cmd')
-rw-r--r--Library/Homebrew/cmd/audit.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/Library/Homebrew/cmd/audit.rb b/Library/Homebrew/cmd/audit.rb
index f4ed74ba6..6bab71095 100644
--- a/Library/Homebrew/cmd/audit.rb
+++ b/Library/Homebrew/cmd/audit.rb
@@ -294,6 +294,16 @@ class FormulaAuditor
problem "#{cksum.hash_type} should be lowercase" unless cksum.hexdigest == cksum.hexdigest.downcase
end
end
+
+ # Check for :using that is already detected from the url
+ @specs.each do |s|
+ next if s.using.nil?
+
+ url_strategy = DownloadStrategyDetector.detect(s.url)
+ using_strategy = DownloadStrategyDetector.detect('', s.using)
+
+ problem "redundant :using specification in url or head" if url_strategy == using_strategy
+ end
end
def audit_patches