From 50b94ada1b0dd0462ab3bf252243b6f1892f3dd4 Mon Sep 17 00:00:00 2001 From: Adam Vandenberg Date: Mon, 24 Feb 2014 20:23:21 -0800 Subject: [PATCH] add audit for Formula.factory --- Library/Homebrew/cmd/audit.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Library/Homebrew/cmd/audit.rb b/Library/Homebrew/cmd/audit.rb index 846aaffa00..edeb03d033 100644 --- a/Library/Homebrew/cmd/audit.rb +++ b/Library/Homebrew/cmd/audit.rb @@ -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)