google-java-format
google-java-format copied to clipboard
Reformats Java source code to comply with Google Java Style.
Hello, This enhancement, when I have opened the project I searched on the Readme how to use the project in VScode but I did not find.
This change adds a flag to google-java-format-diff.py to verify that a diff is formatted instread of reformating the files. Useful to enforce a styleguide as part of presubmit checks.
We ran into this issue with [ktfmt](https://github.com/facebookincubator/ktfmt), and solved it by replacing the last of the trailing spaces with a special tombstone to prevent GJF from removing all trailing whitespace....
To reproduce: * build 2ddcfd392cc5e45eaa5fb30c723b7e024f5caabb with `mvn clean verify` * create `Foo.java` in core\target, containing 2 identical strings: ````java class Foo { private static final String FMT_B = "........ .....
The formatter assumes that it is executed as a CLI, but it actually has a resource leak. I was trying to use it in a service, and the resource leak...
For the following example I am getting OOM error instead of FormatterException. ``` /*package org.wso2.developerstudio.eclipse.gmf.esb.diagram.edit.parts; import org.eclipse.draw2d.ColorConstants; import org.eclipse.draw2d.Graphics; import org.eclipse.draw2d.GridLayout; import org.eclipse.draw2d.IFigure; import org.eclipse.draw2d.RoundedRectangle; import org.eclipse.draw2d.Shape; import org.eclipse.draw2d.StackLayout; import...
Here's a test case [non-idempotent.zip](https://github.com/google/google-java-format/files/1380355/non-idempotent.zip) Bisecting seems to implicate 79a39179f8c "Wrap line comments that exceed the column limit" by @cushon, which makes sense to me as a culprit.
Consider the following code: ```java class Dummy { void method1() {} void method2() {} void method3() {} /** Documentation. */ void method4() {} class Inner1 {} void method5() {} class...
I'm trying to setup google-java-format plugin for eclipse and for intellij so my team can work with different IDEs. However, though it works well for Intellij it doesnt for the...
https://google.github.io/styleguide/javaguide.html#s3-source-file-structure says > A source file consists of, in order: > > 1. License or copyright information, if present > 2. Package statement > 3. Import statements > 4. Exactly...