GitHub - MrDolch/configurable-java-format: Applies the Google Java Style but allows a configurable line length. Maybe other options follow.

Configurable Java Format

Coverity Scan Build Status

This is a fork of google-java-format with extended configurability. This project is not affiliated with Google.

Changes from the Original

  • Removed all plugins – this fork contains only the core formatter.

  • Added the --width option to specify a custom page width.

  • Supports setting options via environment variables.

Usage

# Help
java -jar configurable-java-format.jar --help

# Format
java -jar configurable-java-format.jar --width=120 File.java

# Format in place
java -jar configurable-java-format.jar --width=120 -i File.java

Alternatively, options can be passed as environment variables:

export JAVA_FORMAT_WIDTH=120
java -jar configurable-java-format.jar File.java

IntelliJ Plugin

Version Downloads

The IntelliJ plugin is separate from the formatter and can be found here:

License

This project is based on google-java-format and follows the same licensing terms.