aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cmd
diff options
context:
space:
mode:
authorXu Cheng2016-01-13 23:25:57 +0800
committerXu Cheng2016-01-14 13:35:36 +0800
commit5f22586389fed1365208abbe06861ca49d3f27d8 (patch)
tree7e23d70fb0941d95c7a57ed7bacba5ccc7e35840 /Library/Homebrew/cmd
parent5e25b08fe4b67c08ca2c36d21c7d6dd138618ac2 (diff)
downloadbrew-5f22586389fed1365208abbe06861ca49d3f27d8.tar.bz2
audit: check url/checksum/mirror outside of stable block
Closes Homebrew/homebrew#48033. Signed-off-by: Xu Cheng <xucheng@me.com>
Diffstat (limited to 'Library/Homebrew/cmd')
-rw-r--r--Library/Homebrew/cmd/audit.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/Library/Homebrew/cmd/audit.rb b/Library/Homebrew/cmd/audit.rb
index 99614a3fd..3c9ed0386 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