audit: flag incorrect language/go requires

This commit is contained in:
Dominyk Tiller 2016-07-10 14:01:34 +01:00
parent ecc329e33f
commit e9925d6177
No known key found for this signature in database
GPG Key ID: FE19AEFCF658C6F6

View File

@ -676,6 +676,10 @@ class FormulaAuditor
if text =~ /def plist/ && text !~ /plist_options/ if text =~ /def plist/ && text !~ /plist_options/
problem "Please set plist_options when using a formula-defined plist." problem "Please set plist_options when using a formula-defined plist."
end end
if text =~ %r{require "language/go"} && text !~ /go_resource/
problem "require \"language/go\" is unnecessary unless using `go_resource`s"
end
end end
def audit_line(line, lineno) def audit_line(line, lineno)