[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Orekit Developers] whitespace fun



Hi all,

Trying to update some build tools like my IDE (I use Eclipse) and maven plugins, I stumbled again
upon a really boring thing: whitespace and indentation :-(

As usual, it is always difficult to find common settings that allow all tools to be happy at the same time. This is even more difficult as some big incompatible change in indentation occurred between checkstyle 5.8 and 5.9 (see <https://github.com/checkstyle/checkstyle/issues/294>), followed by a major release 6.0, the fact that current maven checkstyle plugin uses checkstyle 6.1.1 (the one we used up to know was 5.7 based), that some bug have been introduced between 6.2 and 6.3 (see <https://github.com/checkstyle/checkstyle/issues/1013>), and knowing the eclipse plugin seem to be using something much more recent (perhaps 6.6?). So we have a span of about 10 versions with numerous changes!

Of course, at the same time the Eclipse formatter still don't handle these things the same way as checkstyle does, so we still have to manually add indentation at some places, which is really not fun. I don't know about about IDE but I'm pretty sure the same kind of problems also arise.

So I would like to update our settings to match the more recent guidelines and avoid too much hassle for incoming development, at least for the near future.

The rationale would be the same as before: checkstyle settings would be the final reference (i.e. when checkstyle and IDE do not agree, checkstyle will be considered right). I will try to update the Apache-commons.xml setting that can be used in Eclipse, but this will be useful only to Eclipse users, I cannot do that for other IDE. I will take the opportunity to align more our Orekit setting with Apache Commons Math, for example regarding switch/case (I don't even remember why we use the ugly Oracle style in Orekit, at least this is an improvement as we can have Eclipse and checkstyle agreeing there).

If you agree with this, there will be a huge commit for whitespace settings, without functional change. The commit is ready, it was really a boring morning to do this stuff.

What do you think?

Luc