#9365·rubocop

Layout/EmptyLinesAroundArguments has a bad default: makes documentation worse

Author: jaredbeckCreated Jan 11, 2021Updated Sep 1, 2026
Labelsstale

Is your feature request related to a problem? Please describe.

Please consider the following documentation.

ruby
foo(
  1,

  # Documentation that only applies to 2
  # Often over multiple lines
  2,

  3
)

We use empty lines intentionally, to demonstrate that the documentation applies only to 2. This improvement to the documentation results in this offense:

foo.rb:x:x: C: [Correctable] Layout/EmptyLinesAroundArguments: Empty line detected around arguments.

By forbidding the use of such empty lines, the current default makes documentation worse.

Describe the solution you'd like

Change the default of Layout/EmptyLinesAroundArguments to allow better documentation.

Describe alternatives you've considered

Disable the Layout/EmptyLinesAroundArguments cop in all my projects.