google/google-java-format: Reformats Java source code to comply with Google Java Style.
java -jar /path/to/google-java-format-1.6-all-deps.jar <options> [files...]
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
).
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.
Read full article from google/google-java-format: Reformats Java source code to comply with Google Java Style.
No comments:
Post a Comment