From a9c0361a1d83374059fca73485643e89c2772331 Mon Sep 17 00:00:00 2001 From: Dominyk Tiller Date: Mon, 4 Apr 2016 17:41:39 +0100 Subject: [PATCH] audit: require plist_options when using plist Closes #19. Signed-off-by: Dominyk Tiller --- Library/Homebrew/cmd/audit.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Library/Homebrew/cmd/audit.rb b/Library/Homebrew/cmd/audit.rb index 5f4d7cb0ae..acc22f98a1 100644 --- a/Library/Homebrew/cmd/audit.rb +++ b/Library/Homebrew/cmd/audit.rb @@ -638,6 +638,10 @@ class FormulaAuditor problem "\"Formula.factory(name)\" is deprecated in favor of \"Formula[name]\"" end + if text =~ /def plist/ && text !~ /plist_options/ + problem "Please set plist_options when using a formula-defined plist." + end + if text =~ /system "npm", "install"/ && text !~ %r[opt_libexec\}/npm/bin] && formula.name !~ /^kibana(\d{2})?$/ need_npm = "\#{Formula[\"node\"].opt_libexec\}/npm/bin" problem <<-EOS.undent