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

Consider the following code and try inlining `isEmpty2`: ```java import java.util.Collection; import java.util.List; public class InliningWithJavaFormat { static boolean isEmpty(Collection c) { return c == null || c.isEmpty(); } static...

IntelliJ

Applies to: 1.23.0 I came across this oddity - this file from Apache Lucene: [SandboxFacetsExample.txt](https://github.com/user-attachments/files/16803830/SandboxFacetsExample.txt) doesn't need any changes with jdk17-jdk22: ``` > java -version openjdk version "22.0.1" 2024-04-16 OpenJDK...

When annotations are mixed with modifiers, formatter formats the code in following way: ``` $ cat TestingModifiers.java /** some javadoc. */ public abstract class TestingModifiers { abstract @MyAnnotation2 public void...

non-whitespace

It will be awesome to remove such empty `` tags. At least there is defenetely no text after it. https://google.github.io/styleguide/javaguide.html#s7.1.2-javadoc-paragraphs > Each paragraph except the first has `` immediately before...

content with tab: ``` public class Test { /** * The client's first name. * * @serialField serial String some test some testsome testsome testsome testsome testsome test * Path...

# Summary Following the [instructions](https://github.com/google/google-java-format/blob/master/README.md#intellij-android-studio-and-other-jetbrains-ides), I'm unable to get the formatter plugin to work. # Details I've completed all steps in the instructions: 1. Installed plugin 2. Enabled the plugin...

IntelliJ

Indention of `implements` becomes 0, but should be +4 (as it is line wrap) from 0, so 4. ``` $ cat Test.java /** Tetsing. */ public class Test // comment...

This pull request renames the file `google-java-format-diff.py` to `google_java_format_diff.py` and updates all occurrences in the codebase and documentation to reflect this change. The primary motivation for this change is to...