This is a fork of google-java-format with extended configurability. This project is not affiliated with Google.
- Removed all plugins – this fork contains only the core formatter.
- Added the
--widthoption to specify a custom page width. - Supports setting options via environment variables.
# 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.javaAlternatively, options can be passed as environment variables:
export JAVA_FORMAT_WIDTH=120
java -jar configurable-java-format.jar File.javaThanks to MrDolch for his contributions.
This project is based on google-java-format and follows the same licensing terms.