{"repo":"google/google-java-format","free":true,"listed":false,"github":"https://github.com/google/google-java-format","clone":"git clone https://github.com/google/google-java-format.git","description":"Reformats Java source code to comply with Google Java Style.","language":"Java","stars":6176,"topics":["java","formatter"],"license":null,"category":"dev-tools","readme_excerpt":"google-java-format google-java-format is a program that reformats Java source code to comply with [Google Java Style][]. [Google Java Style]: https://google.github.io/styleguide/javaguide.html Using the formatter From the command-line Download the formatter and run it with: Note that it uses the jdk.compiler module to parse the Java source code. The java binary version used must therefore be from a JDK (not JRE) with a version equal to or newer than the Java language version of the files being formatted. The minimum Java version can be found in pom.xml (currently Java 21). An alternative is to use the available GraalVM based native binaries instead. The formatter can act on whole files, on limited lines ( --lines ), on specific offsets ( --offset ), passing through to standard-out (default) or altered in-place ( --replace ). Option --help will print full usage details; including built-in documentation about other flags, such as --aosp , --fix-imports-only , --skip-sorting-imports , --skip-removing-unused-import , --skip-reflowing-long-strings , --skip-javadoc-formatting , or the --dry-run and --set-exit-if-changed . Using @ reads options and filenames from a file, instead of arguments. To reformat changed lines in a specific patch, use google-java-format-diff.py . Note: There is no configurability as to the formatter's algorithm for formatting. This is a deliberate design decision to unify our code formatting on a single format. IntelliJ, Android Studio, and other JetBrains I","default_branch":null,"files":null,"tree":[],"storefront":"/r/google","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/google/google-java-format/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}