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:
parent
5e25b08fe4
commit
5f22586389
@ -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
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user