Liam Miller-Cushon
Liam Miller-Cushon
The formatter started always breaking after `->` in b8e67444bf432d070c2c4da4de1207946052e8a0. I thought that decision had been made already, but I think I misread @kevinb9n's comment in #2. Anyway, the current behaviour...
It has been modified to break after `->` and `-> {`. It hasn't been modified to keep e.g. `m ->` on the previous line (we haven't decided not to do...
The formatter currently makes very few non-whitespace changes. (Fixing imports is the main example, it also reorders modifiers.) There are some technical reasons we've been slow to add more non-whitespaces...
There's a newer version of the plugin at https://github.com/google/google-java-format/releases/tag/v1.11.0
It looks like this configuration isn't getting pick up: https://github.com/google/google-java-format/blob/bd176704e73771d1dd582d2cd0ae2f8859ae9ca6/pom.xml#L267 The easiest work-around might be to run on JDK 11.
You could also try manually activating the `jdk8` maven profile in IntelliJ (https://www.jetbrains.com/help/idea/work-with-maven-profiles.html#activate_maven_profiles).
Did enabling the `jdk8` profile make a difference?
Note that this is only an issue for line comments that appear at the end of a non-blank line, and that exceed the column limit. It was a known issue...
Thanks for the context. Do you have an estimate for how often these kind of comments appear in your code base? My impression had been that they're uncommon enough that...
That sort of horizontal alignment is gently discouraged (at least not encouraged) by the style guide: https://google.github.io/styleguide/javaguide.html#s4.6.3-horizontal-alignment We were trying to avoid having the formatter introduce lint errors. Previously it...