Eclipse batch formatting
You can format your code using Eclipse. I know, control shift F.
But did you know you can format your code using Eclipse from a script/batch file?
Export your formatting options to an xml file first then write a batch file
that looks something like this:
1 2 3 |
java -cp $ECLIPSE_HOME/startup.jar org.eclipse.core.launcher.Main -noupdate -application org.eclipse.jdt.core.JavaCodeFormatter -config format.config.xml $* |
Read more about it here.