From a8f1b02be936f31d6beedbafae38b063f9085486 Mon Sep 17 00:00:00 2001 From: Gautham Goli Date: Sat, 15 Jul 2017 13:34:16 +0530 Subject: audit: Port audit_options rules for new formulae to rubocop and add test --- Library/Homebrew/dev-cmd/audit.rb | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'Library/Homebrew/dev-cmd') diff --git a/Library/Homebrew/dev-cmd/audit.rb b/Library/Homebrew/dev-cmd/audit.rb index e144fc35c..4bcfdd128 100644 --- a/Library/Homebrew/dev-cmd/audit.rb +++ b/Library/Homebrew/dev-cmd/audit.rb @@ -87,10 +87,14 @@ module Homebrew if !only_cops.empty? options[:only_cops] = only_cops ARGV.push("--only=style") + elsif new_formula + options[:only_cops] = [:FormulaAudit, :FormulaAuditStrict, :NewFormulaAudit] + elsif strict + options[:only_cops] = [:FormulaAudit, :FormulaAuditStrict] elsif !except_cops.empty? options[:except_cops] = except_cops elsif !strict - options[:except_cops] = [:FormulaAuditStrict] + options[:except_cops] = [:FormulaAuditStrict, :NewFormulaAudit] end # Check style in a single batch run up front for performance @@ -553,13 +557,6 @@ class FormulaAuditor problem "keg_only reason should not end with a period." end - def audit_options - return unless @new_formula - return if formula.deprecated_options.empty? - return if formula.versioned_formula? - problem "New formulae should not use `deprecated_option`." - end - def audit_homepage homepage = formula.homepage -- cgit v1.2.3