Merge pull request #4408 from commitay/dependency_order
audit: exempt versioned formulae from new formula audit
This commit is contained in:
commit
f63ea00c29
@ -216,7 +216,7 @@ module Homebrew
|
||||
|
||||
def initialize(formula, options = {})
|
||||
@formula = formula
|
||||
@new_formula = options[:new_formula]
|
||||
@new_formula = options[:new_formula] && !formula.versioned_formula?
|
||||
@strict = options[:strict]
|
||||
@online = options[:online]
|
||||
@display_cop_names = options[:display_cop_names]
|
||||
@ -236,6 +236,7 @@ module Homebrew
|
||||
return unless @style_offenses
|
||||
@style_offenses.each do |offense|
|
||||
if offense.cop_name.start_with?("NewFormulaAudit")
|
||||
next if formula.versioned_formula?
|
||||
new_formula_problem offense.to_s(display_cop_name: @display_cop_names)
|
||||
next
|
||||
end
|
||||
@ -416,7 +417,6 @@ module Homebrew
|
||||
end
|
||||
|
||||
next unless @new_formula
|
||||
next if formula.versioned_formula?
|
||||
next unless @official_tap
|
||||
if dep.tags.include?(:recommended) || dep.tags.include?(:optional)
|
||||
new_formula_problem "Formulae should not have #{dep.tags} dependencies."
|
||||
|
@ -50,7 +50,6 @@ module RuboCop
|
||||
OPTION = "Formulae should not have an `option`".freeze
|
||||
|
||||
def audit_formula(_node, _class_node, _parent_class_node, body_node)
|
||||
return if versioned_formula?
|
||||
problem DEP_OPTION if method_called_ever?(body_node, :deprecated_option)
|
||||
return unless formula_tap == "homebrew-core"
|
||||
problem OPTION if method_called_ever?(body_node, :option)
|
||||
|
Loading…
x
Reference in New Issue
Block a user