diff options
| author | Mike McQuaid | 2017-07-15 13:40:45 +0100 |
|---|---|---|
| committer | GitHub | 2017-07-15 13:40:45 +0100 |
| commit | ce1b26d58d7263cc7a71372f83130b9151888d81 (patch) | |
| tree | 6361963900edca9bfc6335a0bd7b234e58b26491 /Library/Homebrew/dev-cmd/audit.rb | |
| parent | f5cc8daa393fcd6fca811d3152ed14a567ce9c37 (diff) | |
| parent | a8f1b02be936f31d6beedbafae38b063f9085486 (diff) | |
| download | brew-ce1b26d58d7263cc7a71372f83130b9151888d81.tar.bz2 | |
Merge pull request #2905 from GauthamGoli/audit_option_rubocop_3
audit: Port audit_options rules for new formulae to rubocop and add test
Diffstat (limited to 'Library/Homebrew/dev-cmd/audit.rb')
| -rw-r--r-- | Library/Homebrew/dev-cmd/audit.rb | 13 |
1 files changed, 5 insertions, 8 deletions
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 |
