Open
Description
I'd like to propose an addendum. Often times when one has a longer method, you have to do something with the parameters to get the method under 120 lines. One method of doing this is hanging indentation, which is very distracting when trying to grok a larger code base. It breaks the flow of reading.
# Bad - Hanging Indentation
some_method.with.a_longer.chain(:parameter_1,
:parameter_2,
:parameter_3,
:parameter_4)
# Good - Drop to a new line
some_method.with.a_longer.chain(
:parameter_1,
:parameter_2,
:parameter_3,
:parameter_4
)
Now granted the example is mildly confounded and you shouldn't chain methods that long. That being said, it's not unusual to see hanging indentations on 1-2 method chains past the 80th column which makes it near impossible to quickly skim over things.
Can we consider adding this to the guide?
Metadata
Metadata
Assignees
Labels
No labels