add audit for Formula.factory

This commit is contained in:
Adam Vandenberg 2014-02-24 20:23:21 -08:00
parent 27365a568d
commit 50b94ada1b

View File

@ -180,7 +180,7 @@ class FormulaAuditor
def audit_conflicts
f.conflicts.each do |c|
begin
Formula.factory(c.name)
Formulary.factory(c.name)
rescue FormulaUnavailableError
problem "Can't find conflicting formula #{c.name.inspect}."
end
@ -299,6 +299,10 @@ class FormulaAuditor
if text =~ /system\s+['"]xcodebuild/ && text !~ /SYMROOT=/
problem "xcodebuild should be passed an explicit \"SYMROOT\""
end
if text =~ /Formula\.factory\(/
problem "\"Formula.factory(name)\" is deprecated in favor of \"Formula[name]\""
end
end
def audit_line(line)