From 5f22586389fed1365208abbe06861ca49d3f27d8 Mon Sep 17 00:00:00 2001 From: Xu Cheng Date: Wed, 13 Jan 2016 23:25:57 +0800 Subject: [PATCH] audit: check url/checksum/mirror outside of stable block Closes Homebrew/homebrew#48033. Signed-off-by: Xu Cheng --- Library/Homebrew/cmd/audit.rb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Library/Homebrew/cmd/audit.rb b/Library/Homebrew/cmd/audit.rb index 99614a3fd0..3c9ed0386a 100644 --- a/Library/Homebrew/cmd/audit.rb +++ b/Library/Homebrew/cmd/audit.rb @@ -201,6 +201,13 @@ class FormulaAuditor end end 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") problem "Should not have both `head` and `head do`" end