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

Reformats Java source code to comply with Google Java Style.

Results 223 google-java-format issues
Sort by recently updated
recently updated
newest added

It would be helpful if this project would define a module manifest, so that I could avoid exporting java module internals to `ALL-UNNAMED` in Java 17+. I understand I would...

In `ktfmt`, I'd like to format the following: ``` fun longName() = coroutineScope { foo() // } ``` but if it doesn't fit in a single line, I'd like to...

I use the latest `google-java-format` Intellij plugin based on `google-java-format 1.9`. As I understand it, this version should support Java 14/15 features like switch expressions and text blocks. In our...

IntelliJ

and provide an update site

Eclipse

GJF emits the following: ``` f(43 /*bla */ ) ``` (when the max line width is short enough) Note the space between the closing `*/` and the closing `)`. This...

``` java.lang.AssertionError at com.intellij.formatting.WhiteSpace.setLineFeeds(WhiteSpace.java:723) at com.intellij.formatting.WhiteSpace.lambda$arrangeLineFeeds$2(WhiteSpace.java:407) at com.intellij.formatting.WhiteSpace.performModification(WhiteSpace.java:339) at com.intellij.formatting.WhiteSpace.arrangeLineFeeds(WhiteSpace.java:388) at com.intellij.formatting.engine.AdjustWhiteSpacesState.processToken(AdjustWhiteSpacesState.java:156) at com.intellij.formatting.engine.AdjustWhiteSpacesState.doIteration(AdjustWhiteSpacesState.java:75) at com.intellij.formatting.engine.State.iteration(State.java:25) at com.intellij.formatting.engine.StateProcessor.iteration(StateProcessor.java:26) at com.intellij.formatting.FormatProcessor.doIterationsSynchronously(FormatProcessor.java:148) at com.intellij.formatting.FormatProcessor.formatWithoutRealModifications(FormatProcessor.java:129) at com.intellij.formatting.FormatProcessor.formatWithoutRealModifications(FormatProcessor.java:120) at com.intellij.formatting.FormatterImpl.calcIndent(FormatterImpl.java:492) at com.intellij.formatting.FormatterImpl.getLineIndent(FormatterImpl.java:465) at com.intellij.psi.impl.source.codeStyle.CodeStyleManagerImpl$4.doPerform(CodeStyleManagerImpl.java:317)...

IntelliJ

Take the simple class: ``` public class test { public static void main(final String[] args) { String myString = "someString"; //$NON-NLS-1$ } } ``` Using "google-java-format-eclipse-plugin_1.6.0.jar", when formatted it converts:...

``` java.lang.Throwable: Assertion failed: File name: index.blade.php , class: PhpFileImpl at com.intellij.openapi.diagnostic.Logger.assertTrue(Logger.java:218) at com.intellij.psi.impl.source.codeStyle.CodeStyleManagerImpl.reformatText(CodeStyleManagerImpl.java:150) at com.intellij.psi.impl.source.codeStyle.CodeStyleManagerImpl.reformatText(CodeStyleManagerImpl.java:130) at com.intellij.psi.impl.source.codeStyle.CodeStyleManagerImpl.reformatText(CodeStyleManagerImpl.java:112) at com.intellij.psi.impl.source.codeStyle.CodeStyleManagerImpl.reformatText(CodeStyleManagerImpl.java:107) at com.google.googlejavaformat.intellij.CodeStyleManagerDecorator.reformatText(CodeStyleManagerDecorator.java:88) at com.google.googlejavaformat.intellij.GoogleJavaFormatCodeStyleManager.reformatText(GoogleJavaFormatCodeStyleManager.java:60) at com.intellij.codeInsight.editorActions.SelectionQuotingTypedHandler.beforeSelectionRemoved(SelectionQuotingTypedHandler.java:86) at com.intellij.codeInsight.editorActions.TypedHandler.lambda$doExecute$2(TypedHandler.java:184) at com.intellij.codeInsight.editorActions.TypedHandler.callDelegates(TypedHandler.java:241)...

IntelliJ

IntelliJ IDEA Ultimate Version 2021.2.2, Build #IU-212.5284.40 Using bundled JRE macOS 12.0 Beta (21A5522h) on 2020 M1 MacBook Air, 256 GB storage + 8 GB memory I have encountered this...

IntelliJ

Hello! Thank you as always. If after deleting all import statements, there are blank lines before or after, delete one blank line. fixes #598

cla: yes