google-java-format
google-java-format copied to clipboard
Reformats Java source code to comply with Google Java Style.
Javadoc formatting regularly gives undesired results and lags behind in its support for both Javadoc (esp. `{@snippet ...}`) and HTML (e.g. elements such as ``, ``, ``, ``, ... aren't...
### Live template `fori` ### Before: ### Enable google-java-format ### After: ### Version: IntelliJ IDEA 2021.3.3 MacOS arm64 with google-java-format v1.15.0.0
End.
End. __Originally posted by @MatthewLloydThomas in https://github.com/brave/brave-ios/issues/5799__
``` switch (reference.getReferenceTypeCase()) { case A -> ... case B, default -> throw new IllegalArgumentException("Unhandled"); } ``` will fail with ``` Caused by: com.google.googlejavaformat.java.FormatterException: 65:13: error: expected token: 'default'; generated...
I'm highlighting a json in IntelliJ console, and right click and "Show as Json". Then I get the following error: ``` java.lang.IllegalArgumentException: Cannot search for elements with empty text at...
```sh java \ -jar core/target/google-java-format-HEAD-SNAPSHOT-all-deps.jar \ -i \helidon/microprofile/metrics/src/main/java/io/helidon/microprofile/metrics/MetricsCdiExtension.java ``` n/microprofile/metrics/src/main/java/io/helidon/microprofile/metrics/MetricsCdiExtension.java /Users/fsousa/Projects/code/helidon/microprofile/metrics/src/main/java/io/helidon/microprofile/metrics/MetricsCdiExtension.java:error: Something has gone terribly wrong. Please file a bug: https://github.com/google/google-java-format/issues/new #### actual ```java === Actual: === package io.helidon.microprofile.metrics; import...
With the eclipse plugin 1.15.0 (named 1.13.0 on the releases page) the following exception is generated every time the formatter is executed or selected. ``` eclipse.buildId=4.23.0.I20220308-0310 java.version=17.0.2 java.vendor=Eclipse Adoptium BootLoader...
The release page on GitHub for [1.14.0](https://github.com/google/google-java-format/releases/tag/v1.14.0) contains a `google-java-format-eclipse-plugin-1.13.0.jar` but not the expected `google-java-format-eclipse-plugin-1.14.0.jar`.
``` java.lang.Throwable: Assertion failed: Write access is allowed inside write-action only (see com.intellij.openapi.application.Application.runWriteAction()) at com.intellij.openapi.diagnostic.Logger.assertTrue(Logger.java:218) at com.intellij.openapi.application.impl.ApplicationImpl.assertWriteAccessAllowed(ApplicationImpl.java:1256) at com.google.googlejavaformat.intellij.GoogleJavaFormatCodeStyleManager.formatInternal(GoogleJavaFormatCodeStyleManager.java:121) at com.google.googlejavaformat.intellij.GoogleJavaFormatCodeStyleManager.reformatText(GoogleJavaFormatCodeStyleManager.java:59) at com.intellij.codeInsight.editorActions.FixDocCommentAction.lambda$reformatCommentKeepingEmptyTags$3(FixDocCommentAction.java:246) at com.intellij.application.options.CodeStyle.doWithTemporarySettings(CodeStyle.java:338) at com.intellij.codeInsight.editorActions.FixDocCommentAction.reformatCommentKeepingEmptyTags(FixDocCommentAction.java:236) at com.intellij.codeInsight.editorActions.FixDocCommentAction.generateComment(FixDocCommentAction.java:222) at...
I have the v.1.15.0 IntelliJ plugin with GJF and IntelliJ IDEA 2021.3. I have a save action to format the file. When adding a multi line string string next to...