audit: require plist_options when using plist

Closes #19.

Signed-off-by: Dominyk Tiller <dominyktiller@gmail.com>
This commit is contained in:
Dominyk Tiller 2016-04-04 17:41:39 +01:00
parent 776a73da7c
commit a9c0361a1d

View File

@ -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