diff options
| author | Mike McQuaid | 2017-09-05 18:07:25 +0100 |
|---|---|---|
| committer | GitHub | 2017-09-05 18:07:25 +0100 |
| commit | 4cc8d4737b1c87cdc2d2c9e90d80b3b372bb924c (patch) | |
| tree | 10f2bf1d7f5f198247553d28e90259e3ffcf6b10 /Library/Homebrew/dev-cmd | |
| parent | c6d5f8cc99981310ea9f2763d9e53eac4eaeef8a (diff) | |
| parent | d45ff9c0fdfa834c55c01f9c95fe18064fabd76a (diff) | |
| download | brew-4cc8d4737b1c87cdc2d2c9e90d80b3b372bb924c.tar.bz2 | |
Merge pull request #2982 from GauthamGoli/audit_class_rubocop_port
audit: Port audit_class to rubocop, add tests and autocorrect
Diffstat (limited to 'Library/Homebrew/dev-cmd')
| -rw-r--r-- | Library/Homebrew/dev-cmd/audit.rb | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/Library/Homebrew/dev-cmd/audit.rb b/Library/Homebrew/dev-cmd/audit.rb index d089f308d..884861c87 100644 --- a/Library/Homebrew/dev-cmd/audit.rb +++ b/Library/Homebrew/dev-cmd/audit.rb @@ -54,6 +54,7 @@ module Homebrew def audit Homebrew.inject_dump_stats!(FormulaAuditor, /^audit_/) if ARGV.switch? "D" + Homebrew.auditing = true formula_count = 0 problem_count = 0 @@ -381,21 +382,6 @@ class FormulaAuditor end end - def audit_class - if @strict - unless formula.test_defined? - problem "A `test do` test block should be added" - end - end - - classes = %w[GithubGistFormula ScriptFileFormula AmazonWebServicesFormula] - klass = classes.find do |c| - Object.const_defined?(c) && formula.class < Object.const_get(c) - end - - problem "#{klass} is deprecated, use Formula instead" if klass - end - # core aliases + tap alias names + tap alias full name @@aliases ||= Formula.aliases + Formula.tap_aliases |
