Open tledoux opened 4 years ago
This issue's a monster and will need breaking down. If there's a will to take it on during OPF's 2020 Hackathon I'll run a quick meeting with volunteers outlining the approach we'll take.
What worked out well as general whitespace normalization by Maven for our ODF Toolkit project pom.xml was the editorconfig-maven-plugin
It will fix whitespace during the build by automation (instead of breaking the build).
Thanks for this @svanteschubert and hi again, it's been a little while. I hope you're well in this strange new normal. Well, this is an exciting suggestion who doesn't like an automated approach. I've used similar with git pre-commits, but Maven is a reasonable choice here. Will check this out.
Currently, the source code is using very different conventions of code formatting (tabs or spaces for indentation, curly braces with LF before or after, separation of function name and parameters, ...). This make the commits quite hard to read and generates useless conflicts.
The idea is to define one standard for the whole project and force the commits to respect it.
A way to go could be to use google-java-format which is provided in Java (so works on every computer that tries to dev on Jhove), works with maven, provides plug-ins for the main IDE and most importantly can be define as a pre-commit hook for git which will make sure every file is indeed formatted as the others.
The initial commit (reformatting everything will be painfull) but in the long run it should make life easier...