audit: deconstruct versioned_conflicts_whitelist using splat

This commit is contained in:
JCount 2017-03-05 15:06:02 -05:00
parent 4e50562424
commit 460c4a3200

View File

@ -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.