I would suggest to have a git hook, that automatically format the code before a commit is made.
This git hook code be installed into the ImageJ / SciJava / Imglib2 git projects:
There’s a maven plugin for code formatting, that uses exclipse code style settings. I use is in https://github.com/maarzt/imglib2-labkit.
It only needs to by configured in the pom.xml:
It refers to the eclipse style settings stored in the same project:
When this is configured correctly, the simple command:
mvn formatter:format will format the project correctly. Nothing else need’s to be installed. There is also a second maven plugin for organizing the imports.
I would suggest that we add to the ImageJ / SciJava / Imglib2 git repositorys. Together with a (optional) git hook. Something similar to the “travisify” script to install this would be nice.
I think @turekg could be the one to make this happen. And it would solve all our code formatting problems.