currently I’m looking for a Java SourceCode formatter which can be integrated into the Eclipse-IDE and also run as standalone application.
The development department of my company needs a fixed source code formatting, as we experienced formatter changes during every Eclipse-IDE update.
We are already using clang-format for our C++ SourceCode base and as clang-format supports also Java, we wanted to evaluate it.
Currently our Java SourceCode is Java8 compliant, but I have some questions regarding clang-format and the supported Java language features:
· Which Java version does clang-format support currently and is the support for a specific Java version built into the clang-format library/executable or the .clang style?
· Does clang-format already support language features of Java9+?
· How does the current clang-format formatter handle SourceCode which contains language features which it does not know about? Let’s say for example clang-format supports Java8 but we use Java9 or Java10 with new language features?
o Does it leave the area of the source code unformatted and continues with the remaining content of the source file or
o Can’t it handle new language features at all and leaves the whole file unformatted?
I hope you can help me with this questions.