google-java-format
google-java-format copied to clipboard
Reformats Java source code to comply with Google Java Style.
When using the IntelliJ google-java-formatter 1.16.0.2 with the AOSP style, the "Optimize Imports" action results in empty lines between imports with different TLDs. ### Given: ```java // ... import static...
I would like to run `google-java-format` in an (open source) project which uses Bazel as build system. I currently have it set up using https://github.com/dustinsand/pre-commit-jvm (with https://pre-commit.com) but it strikes...
I am trying to enable plugin for remote development, but it does not work. I installed the plugin for both host and client side, add all needed properties to `Custom...
Is it possible to format files in a folder recursively? I tried: java -jar google-java-format-1.19.2-all-deps.jar -replace "folder/extra/*", but it formats only files within this folder and does not format files...
#981 introduced [JEP-430](https://openjdk.org/jeps/430) / [JEP-459](https://openjdk.org/jeps/459) _String Templates_ support. This works great (~leaves it alone) for "single line", e.g. `var html = STR."";` However [when exploring using this](https://github.com/enola-dev/enola/blob/719a747f1d89c6bc362e6282f986c364b56e5a7a/web/ui/src/main/java/dev/enola/web/ui/ThingUI.java#L37) for `"""` Multi-Line...
Comments at the end of this `if` makes the `then` block to not get indented. ``` if (prd.source() .isPresent()) // exclude generated productions like casts prd = null; ``` ...
My Java files are not being formatted on save, only when I do a reformat manually. I can see that the google-java-format plugin is running when I save the file...
In the latest version of IntelliJ IDEA it's a little different and we can also include shortcuts to help people. Step 1:  Step 2:  Step 3:  [IntelliJIDEA_ReferenceCard](https://resources.jetbrains.com/storage/products/intellij-idea/docs/IntelliJIDEA_ReferenceCard.pdf)
Using v1.18.1 plugins for Eclipse and IntelliJ, but there is difference in imports order for both IDEs. Imports layouts for Eclipse:  Imports layouts for IntelliJ:  Imports in IntelliJ:...
My code use some preview feature, such as string template. the code likes below ```java throw new IllegalArgumentException(STR."place:\{placeOrg.getName()},\{yearMonth}"); ``` the error message is below ``` google-java-format failed. Does SchedulingAutomateFacade.java have...