Zero Config Code Formatter?

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

SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
  • google-java-format

    Reformats Java source code to comply with Google Java Style.

    Eventually it was clear that google-java-format was pulling ahead, and it was clear that the primary reason for that was The Rectangle Rule -- a principle I'd vomited forth one day that somehow had gone the distance. Structure-revealing code turns out to be readable code, and our users kept preferring it.

  • SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

    SaaSHub logo
  • palantir-java-format

    A modern, lambda-friendly, 120 character Java formatter.

    I don't have personal experience with it, but there is the palantir-java-format: https://github.com/palantir/palantir-java-format

  • styleguide

    Style guides for Google-originated open-source projects

    You just need to have the desired Format rules, like https://github.com/google/styleguide/blob/gh-pages/intellij-java-google-style.xml

  • spotless

    Keep your code spotless

    I use Spotless but it’s not as opiniotated as Prettier or Black

  • java-code-styles

    IntelliJ IDEA code style settings for Square's Java and Android projects.

    I like square’s java code style for intellij, https://github.com/square/java-code-styles, probably there’s a way to run these at the terminal

  • prettier-java

    Prettier Java Plugin

    Prettier has support for Java. https://github.com/jhipster/prettier-java

  • spring-javaformat

  • fmt-maven-plugin

    Opinionated Maven Plugin that formats your Java code.

    https://github.com/spotify/fmt-maven-plugin (formerly coveo) both to format before commit and to check on ci that the formatting is correct.

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

  • What supporting tools (linting, style/formatting, etc) are you using nowadays?

    1 project | /r/java | 18 Jul 2022
  • Use semantic indenting

    1 project | /r/Kotlin | 22 Mar 2022
  • The obligatory braces and if/else questions

    1 project | /r/javahelp | 10 Sep 2021
  • In search of modern Java Style guide

    4 projects | /r/java | 2 Jun 2021
  • Java Cheatsheet to refresh the basic concepts of Java

    1 project | /r/java | 16 Apr 2021

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