Skip to content

Commit 548eeef

Browse files
committed
Temporarily disable rubocop's RubyLsp/UseRegisterWithHandlerMethod
1 parent 6b51fc6 commit 548eeef

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

lib/ruby_lsp/listeners/discover_tests.rb

+4-4
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def initialize(response_builder, global_state, dispatcher, uri)
2424
end
2525

2626
#: (Prism::ClassNode node) -> void
27-
def on_class_node_enter(node)
27+
def on_class_node_enter(node) # rubocop:disable RubyLsp/UseRegisterWithHandlerMethod
2828
@visibility_stack << :public
2929
name = constant_name(node.constant_path)
3030
name ||= name_with_dynamic_reference(node.constant_path)
@@ -36,7 +36,7 @@ def on_class_node_enter(node)
3636
end
3737

3838
#: (Prism::ModuleNode node) -> void
39-
def on_module_node_enter(node)
39+
def on_module_node_enter(node) # rubocop:disable RubyLsp/UseRegisterWithHandlerMethod
4040
@visibility_stack << :public
4141

4242
name = constant_name(node.constant_path)
@@ -46,13 +46,13 @@ def on_module_node_enter(node)
4646
end
4747

4848
#: (Prism::ModuleNode node) -> void
49-
def on_module_node_leave(node)
49+
def on_module_node_leave(node) # rubocop:disable RubyLsp/UseRegisterWithHandlerMethod
5050
@visibility_stack.pop
5151
@nesting.pop
5252
end
5353

5454
#: (Prism::ClassNode node) -> void
55-
def on_class_node_leave(node)
55+
def on_class_node_leave(node) # rubocop:disable RubyLsp/UseRegisterWithHandlerMethod
5656
@visibility_stack.pop
5757
@nesting.pop
5858
end

lib/ruby_lsp/listeners/spec_style.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ def initialize(response_builder, global_state, dispatcher, uri)
2020
self,
2121
:on_class_node_enter,
2222
:on_class_node_leave,
23-
:on_module_node_enter,
24-
:on_module_node_leave,
23+
:on_module_node_enter, # rubocop:disable RubyLsp/UseRegisterWithHandlerMethod
24+
:on_module_node_leave, # rubocop:disable RubyLsp/UseRegisterWithHandlerMethod
2525
:on_call_node_enter, # e.g. `describe` or `it`
2626
:on_call_node_leave,
2727
)

lib/ruby_lsp/listeners/test_style.rb

+3-3
Original file line numberDiff line numberDiff line change
@@ -139,9 +139,9 @@ def initialize(response_builder, global_state, dispatcher, uri)
139139
dispatcher.register(
140140
self,
141141
:on_class_node_enter,
142-
:on_class_node_leave,
143-
:on_module_node_enter,
144-
:on_module_node_leave,
142+
:on_class_node_leave, # rubocop:disable RubyLsp/UseRegisterWithHandlerMethod
143+
:on_module_node_enter, # rubocop:disable RubyLsp/UseRegisterWithHandlerMethod
144+
:on_module_node_leave, # rubocop:disable RubyLsp/UseRegisterWithHandlerMethod
145145
:on_def_node_enter,
146146
:on_call_node_enter,
147147
:on_call_node_leave,

0 commit comments

Comments
 (0)