Skip to content

Commit 0edc431

Browse files
committed
Temporarily disable rubocop's RubyLsp/UseRegisterWithHandlerMethod
1 parent ffa2648 commit 0edc431

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
@@ -19,8 +19,8 @@ def initialize(response_builder, global_state, dispatcher, uri)
1919
self,
2020
:on_class_node_enter,
2121
:on_class_node_leave,
22-
:on_module_node_enter,
23-
:on_module_node_leave,
22+
:on_module_node_enter, # rubocop:disable RubyLsp/UseRegisterWithHandlerMethod
23+
:on_module_node_leave, # rubocop:disable RubyLsp/UseRegisterWithHandlerMethod
2424
:on_call_node_enter, # e.g. `describe` or `it`
2525
:on_call_node_leave,
2626
)

lib/ruby_lsp/listeners/test_style.rb

+3-3
Original file line numberDiff line numberDiff line change
@@ -137,9 +137,9 @@ def initialize(response_builder, global_state, dispatcher, uri)
137137
dispatcher.register(
138138
self,
139139
:on_class_node_enter,
140-
:on_class_node_leave,
141-
:on_module_node_enter,
142-
:on_module_node_leave,
140+
:on_class_node_leave, # rubocop:disable RubyLsp/UseRegisterWithHandlerMethod
141+
:on_module_node_enter, # rubocop:disable RubyLsp/UseRegisterWithHandlerMethod
142+
:on_module_node_leave, # rubocop:disable RubyLsp/UseRegisterWithHandlerMethod
143143
:on_def_node_enter,
144144
:on_call_node_enter,
145145
:on_call_node_leave,

0 commit comments

Comments
 (0)