rubocops/lines: be less strict about OS.{mac,linux}? in taps.
Fixes #12040.
This commit is contained in:
parent
1e83399e31
commit
56753c9d08
@ -394,6 +394,12 @@ module RuboCop
|
||||
end
|
||||
end
|
||||
|
||||
# Don't restrict OS.mac? or OS.linux? usage in taps; they don't care
|
||||
# as much as we do about e.g. formulae.brew.sh generation, often use
|
||||
# platform-specific URLs and we don't want to add DSLs to support
|
||||
# that case.
|
||||
next if formula_tap != "homebrew-core"
|
||||
|
||||
find_instance_method_call(body_node, "OS", if_method_name) do |method|
|
||||
valid = T.let(false, T::Boolean)
|
||||
method.each_ancestor do |ancestor|
|
||||
|
Loading…
x
Reference in New Issue
Block a user