What java formatter do you use for formatting source code?

This page summarizes the projects mentioned and recommended in the original post on /r/java

CodeRabbit: AI Code Reviews for Developers
Revolutionize your code reviews with AI. CodeRabbit offers PR summaries, code walkthroughs, 1-click suggestions, and AST-based analysis. Boost productivity and code quality across all major languages with each PR.
coderabbit.ai
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
  1. google-java-format

    Reformats Java source code to comply with Google Java Style.

    I am setting up my java IDE with neovim, and I am searching for a good formatter. I have came across google-java-format, yet I want to know if there is any other alternative?

  2. CodeRabbit

    CodeRabbit: AI Code Reviews for Developers. Revolutionize your code reviews with AI. CodeRabbit offers PR summaries, code walkthroughs, 1-click suggestions, and AST-based analysis. Boost productivity and code quality across all major languages with each PR.

    CodeRabbit logo
  3. formatter-maven-plugin

    Formatter Maven Plugin

    I've been partial to revlc/formatter-maven-plugin for some time

  4. fmt-maven-plugin

    Opinionated Maven Plugin that formats your Java code.

    Coveo is another one that's easier to set up because /drumroll - there are no configurations at all. It uses the google java format which, as /u/dpash pointed out in his response has 2 space indentation and comically short lines. I'm not advocating 300 line lengths or anything, but google's style is very rigid in that regard. I've actually gotten used to the 2 space thing.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • Create a native Kotlin application with Spring Boot Native, Gradle, and GraalVM without Docker for MacOS and Windows

    2 projects | dev.to | 6 Oct 2024
  • Native Build Tools version 0.9.28 is released!🛠️

    1 project | /r/graalvm | 3 Nov 2023
  • 📢📢📢RefactorFirst 0.4.0 is released!!!📢📢📢

    1 project | /r/java | 27 Jun 2023
  • Any good jpackage plugin in maven?

    2 projects | /r/Maven | 24 Apr 2023
  • Native Build Tools 0.9.20 release

    1 project | /r/graalvm | 15 Feb 2023

Did you know that Java is
the 8th most popular programming language
based on number of references?