mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
rubocop/conflicts: use full name in whitelist.
This commit is contained in:
parent
c5b8983da4
commit
2e74e50f82
@ -12,13 +12,13 @@ module RuboCop
|
||||
"Use `keg_only :versioned_formula` instead."
|
||||
|
||||
WHITELIST = %w[
|
||||
bash-completion@
|
||||
bash-completion@2
|
||||
].freeze
|
||||
|
||||
def audit_formula(_node, _class_node, _parent_class_node, body)
|
||||
return unless versioned_formula?
|
||||
|
||||
problem MSG if !@formula_name.start_with?(*WHITELIST) &&
|
||||
problem MSG if !WHITELIST.include?(@formula_name) &&
|
||||
method_called_ever?(body, :conflicts_with)
|
||||
end
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user