aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/cmd/audit.rb13
1 files changed, 4 insertions, 9 deletions
diff --git a/Library/Homebrew/cmd/audit.rb b/Library/Homebrew/cmd/audit.rb
index a546bcf8a..91a5cce2b 100644
--- a/Library/Homebrew/cmd/audit.rb
+++ b/Library/Homebrew/cmd/audit.rb
@@ -224,17 +224,12 @@ class FormulaAuditor
end
end
- if Object.const_defined?("GithubGistFormula") && formula.class < GithubGistFormula
- problem "GithubGistFormula is deprecated, use Formula instead"
+ classes = %w[GithubGistFormula ScriptFileFormula AmazonWebServicesFormula]
+ klass = classes.find do |c|
+ Object.const_defined?(c) && formula.class < Object.const_get(c)
end
- if Object.const_defined?("ScriptFileFormula") && formula.class < ScriptFileFormula
- problem "ScriptFileFormula is deprecated, use Formula instead"
- end
-
- if Object.const_defined?("AmazonWebServicesFormula") && formula.class < AmazonWebServicesFormula
- problem "AmazonWebServicesFormula is deprecated, use Formula instead"
- end
+ problem "#{klass} is deprecated, use Formula instead" if klass
end
# core aliases + tap alias names + tap alias full name