google-java-format
google-java-format copied to clipboard
Reformats Java source code to comply with Google Java Style.
### Expected Behavior ```shell /* File header */ package ... ``` ⇓ ```shell /* File header */ package ... ``` ### Current Behavior ```shell /* File header */ package ......
Similar to https://github.com/google/google-java-format/issues/787#issuecomment-1971447073_ `Caused by: java.lang.IllegalAccessError: class com.google.googlejavaformat.java.RemoveUnusedImports (in unnamed module @0x2b099be2) cannot access class com.sun.tools.javac.util.Context (in module jdk.compiler) because module jdk.compiler does not export com.sun.tools.javac.util to unnamed module @0x2b099be2...
Omit the redundant method isReal() to make it simpler since we can directly compare the enum instance with == https://github.com/google/google-java-format/blob/18f835849551f81d60d582300a0a3c585b5774b4/core/src/main/java/com/google/googlejavaformat/Doc.java#L394
Would you kindly consider adding the following combinations to your GraalVM native-image binaries to your releases? - `google-java-format_darwin-x86_64` (older Apple hardware) - `google-java-format_linux-arm64` (Raspberry Pi, AWS Graviton, etc) Thanks so...
- [ ] 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...
Let Test.java be: ``` class Test { void foo() { // Columns: // 1 2 3 4 5 6 7 8 9 // ..0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 System.err.println("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"); } } ``` What I...
On MacOS 14.5 IntelliJ 2024.1.3 I don't see google-java-format  and plugin is enabled 
The formatter can't format the following code, it fails with parsing error. ```java switch (option) { case Some(var a) -> a; case None() -> "None"; }; ```
Transplanting this issue https://github.com/facebook/ktfmt/issues/239