Audit url/devel/head for redundant :using
This commit is contained in:
parent
0e7d47332c
commit
903c340664
@ -294,6 +294,16 @@ class FormulaAuditor
|
|||||||
problem "#{cksum.hash_type} should be lowercase" unless cksum.hexdigest == cksum.hexdigest.downcase
|
problem "#{cksum.hash_type} should be lowercase" unless cksum.hexdigest == cksum.hexdigest.downcase
|
||||||
end
|
end
|
||||||
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
|
end
|
||||||
|
|
||||||
def audit_patches
|
def audit_patches
|
||||||
|
|||||||
@ -4,6 +4,7 @@ require 'version'
|
|||||||
|
|
||||||
class SoftwareSpec
|
class SoftwareSpec
|
||||||
attr_reader :checksum, :mirrors, :specs
|
attr_reader :checksum, :mirrors, :specs
|
||||||
|
attr_reader :using # for auditing
|
||||||
|
|
||||||
def initialize url=nil, version=nil
|
def initialize url=nil, version=nil
|
||||||
@url = url
|
@url = url
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user