File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -45,16 +45,18 @@ def visit_call_node(node)
4545 call_operator_loc = node . call_operator_loc
4646 message_loc = node . message_loc
4747 if receiver_loc && call_operator_loc && message_loc
48- # foo
49- # .bar
48+ # dot-leading (dot on the next line)
49+ # foo # line 1 — consecutive
50+ # .bar # line 2
5051 if receiver_loc . end_line != call_operator_loc . start_line && call_operator_loc . start_line == message_loc . start_line
5152 ( receiver_loc . end_line ..call_operator_loc . start_line - 1 ) . each do |line |
5253 @consecutive_lines [ line ] = true
5354 end
5455 end
5556
56- # foo.
57- # bar
57+ # dot-trailing (dot on the same line as the receiver)
58+ # foo. # line 1 — consecutive
59+ # bar # line 2
5860 if receiver_loc . end_line == call_operator_loc . start_line && call_operator_loc . start_line != message_loc . start_line
5961 ( call_operator_loc . start_line ..message_loc . start_line - 1 ) . each do |line |
6062 @consecutive_lines [ line ] = true
You can’t perform that action at this time.
0 commit comments