Download the formatter and run it with: 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.
Other supported languages: Haskell, Agda, Erlang, Groovy, Ruby, Elixir, Objective-C, PHP, SQL, Apex language, Bash, C# Razor Pages, GLSL (the OpenGL Shading Language ...