lib/rubocop/cop/rbs/layout/end_alignment.rb in rubocop-on-rbs-1.0.0 vs lib/rubocop/cop/rbs/layout/end_alignment.rb in rubocop-on-rbs-1.1.0
- old
+ new
@@ -32,9 +32,11 @@
end
end
end
def check(decl, expect:)
+ return if decl.location.start_line == decl.location.end_line
+
end_loc = decl.location[:end]
actual = end_loc.start_column
if actual != expect
line_start_pos = processed_source.raw_source.rindex(/\R/, end_loc.start_pos) + 1
range = range_between(end_loc.start_pos, end_loc.end_pos)