From 4ec26aea4025d19e70cdf59da6dfd7be3a389e44 Mon Sep 17 00:00:00 2001 From: Gautham Goli Date: Mon, 4 Sep 2017 13:47:05 +0530 Subject: audit: Port audit_class to rubocop, add tests and autocorrect --- Library/Homebrew/dev-cmd/audit.rb | 15 --------------- 1 file changed, 15 deletions(-) (limited to 'Library/Homebrew/dev-cmd') diff --git a/Library/Homebrew/dev-cmd/audit.rb b/Library/Homebrew/dev-cmd/audit.rb index d089f308d..1f8acb1b9 100644 --- a/Library/Homebrew/dev-cmd/audit.rb +++ b/Library/Homebrew/dev-cmd/audit.rb @@ -381,21 +381,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 -- cgit v1.2.3 From d45ff9c0fdfa834c55c01f9c95fe18064fabd76a Mon Sep 17 00:00:00 2001 From: Gautham Goli Date: Sat, 2 Sep 2017 12:38:18 +0530 Subject: audit: Add a global flag to silent warning when auditing --- Library/Homebrew/dev-cmd/audit.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'Library/Homebrew/dev-cmd') diff --git a/Library/Homebrew/dev-cmd/audit.rb b/Library/Homebrew/dev-cmd/audit.rb index 1f8acb1b9..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 -- cgit v1.2.3