audit: check url/checksum/mirror outside of stable block

Closes Homebrew/homebrew#48033.

Signed-off-by: Xu Cheng <xucheng@me.com>
This commit is contained in:
Xu Cheng 2016-01-13 23:25:57 +08:00
parent 5e25b08fe4
commit 5f22586389

View File

@ -201,6 +201,13 @@ class FormulaAuditor
end end
end end
present.map!(&:last) present.map!(&:last)
if present.include?("stable block")
%w[url checksum mirror].each do |component|
if present.include?(component)
problem "`#{component}` should be put inside `stable block`"
end
end
end
if present.include?("head") && present.include?("head block") if present.include?("head") && present.include?("head block")
problem "Should not have both `head` and `head do`" problem "Should not have both `head` and `head do`"
end end