mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
audit: deconstruct versioned_conflicts_whitelist using splat
This commit is contained in:
parent
4e50562424
commit
460c4a3200
@ -535,8 +535,7 @@ class FormulaAuditor
|
|||||||
versioned_conflicts_whitelist = %w[node@ bash-completion@]
|
versioned_conflicts_whitelist = %w[node@ bash-completion@]
|
||||||
|
|
||||||
return unless formula.conflicts.any? && formula.versioned_formula?
|
return unless formula.conflicts.any? && formula.versioned_formula?
|
||||||
versioned_conflicts_whitelist.each { |c|
|
return if formula.name.start_with?(*versioned_conflicts_whitelist)
|
||||||
return if formula.name.start_with? c }
|
|
||||||
problem <<-EOS
|
problem <<-EOS
|
||||||
Versioned formulae should not use `conflicts_with`.
|
Versioned formulae should not use `conflicts_with`.
|
||||||
Use `keg_only :versioned_formula` instead.
|
Use `keg_only :versioned_formula` instead.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user