-
Notifications
You must be signed in to change notification settings - Fork 28
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
[java] not enough indentation when using builder pattern #124
Comments
The builder pattern doesn't seem to a relevant factor here, this is how it indents any argument list. Do you want any continued expression to be indented extra? Or only specific types like
|
I misspoke in my original example. The better example case is when you have the cursor before the last https://google.github.io/styleguide/javaguide.html#s4.5.2-line-wrapping-indent says
I realize this is written a bit vaguely, but based on it I would say that things like (bracket-less) arithmetic, boolean, etc. expressions should be written with the same continuation level, but also sequential dot-accesses should too, e.g.: T out = foo
.bar()
.baz()
.quux(); is valid. In my example (with the corrected position of the newline), there's a +4 indent after the I hope that helps! |
So a continued argument should always be intented more than the start of the argument? I.e. even in my example, you want the indentation shown below?
|
I checked with our formatter, and yes, that is correct. |
if you have the cursor after the last
.
and press enter, the cursor goes underneath the start ofnew
, whereas it should have a +4 indentThe text was updated successfully, but these errors were encountered: