-
Notifications
You must be signed in to change notification settings - Fork 885
Indenting too much #506
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Isn't it the Rectangle Rule at work? |
I wasn't aware of that rule. Thanks for point me to it. I'm thinking this what I had posted should be considered to be an exception to the rule. The following may fall under the same exception:
is, IMO, more readable than:
considering it's very similar to:
I'm wondering if the root issue is the preference towards exposing program structure over exposing the more meaningful parts of the program. For example, the body of the lambda passed into |
See #19 about lambdas |
@tbroyer covered it, the formatter prioritizes breaking at higher syntactic levels (i.e. the rectangle rule) over conserving vertical space or minimizing lines or indentation. |
The following code is indented too much after
Array.of
:And since it's nowhere near the 100 character line limit, ideally it would be:
The text was updated successfully, but these errors were encountered: