google-java-format icon indicating copy to clipboard operation
google-java-format copied to clipboard

Issue with text blocks formatting on java 21. Defaulting to extreme left indentation

Open rohan-changejar opened this issue 1 year ago • 8 comments

  • [ ] Issue description - While trying to migrate our existing string implementations of string append to the latest text block format in our java 21 project, we are seeing that text blocks are not being handled properly and therefore causing unexpected left indentation, which is deviant from the standard formatting pattern

  • [ ] Gradle or Maven version - id "com.diffplug.spotless" version "6.17.0"

  • [ ] operating system and version - MacOs sonoma 14.5

  • [ ] spotless { java { // googleJavaFormat() // optional: you can specify a specific version (>= 1.8) and/or switch to AOSP style // and/or reflow long strings // and/or use custom group artifact (you probably don't need this) googleJavaFormat('1.22.0').aosp().reflowLongStrings().groupArtifact('com.google.googlejavaformat:google-java-format') } }

image

rohan-changejar avatar Jun 18 '24 07:06 rohan-changejar

Facing the same issue, please help

tejasraj-jar avatar Jun 18 '24 07:06 tejasraj-jar

+1 .. Facing a similar issue

sidkram avatar Jun 18 '24 07:06 sidkram

Ruins the point of formatting the code, please fix this

Sehag avatar Jun 18 '24 07:06 Sehag

Same here.

neutrino1997 avatar Jun 18 '24 07:06 neutrino1997

Facing a similar issue, Please fix.

yashwithalva avatar Jun 18 '24 07:06 yashwithalva

Facing the same issue.

Shreyank031 avatar Jun 18 '24 07:06 Shreyank031

Facing the similar issue, taking a bit more time to format it and thus reducing the efficiency of the developers. Please help us sort this soon. Thank you!

Naresh-Srinivas avatar Jun 18 '24 08:06 Naresh-Srinivas

Related to

  • #883 ?

As a workaround sometimes it helps to use an older version of g-j-f ... what never helps is spamming an issue with "+1 comments".

sormuras avatar Jun 18 '24 08:06 sormuras

https://github.com/google/google-java-format/issues/883

cushon avatar Jul 10 '24 20:07 cushon