Closed
Description
Given this file where a defaulted keyword argument is followed by a non-defaulted keyword argument with a comment:
class Foo
def foo(a: 1,
# comment about b
b:)
end
end
Running rubocop -A
totally botches the syntax (besides making the comment no longer associated with the code that the comment is intended for):
# frozen_string_literal: true
class Foo
def foo(b:, a: 1,
# comment about b)
end
end
Expected result: leave the code alone when there are comments involved
rubocop -V
1.50.2 (using Parser 3.3.5.0, rubocop-ast 1.32.3, running on ruby 3.3.4) [x86_64-linux]