zeroc-ice / ice

All-in-one solution for creating networked applications with RPC, pub/sub, server deployment, and more.
https://zeroc.com
GNU General Public License v2.0
2.05k stars 592 forks source link

Bad java formatting #2758

Open bernardnormier opened 2 months ago

bernardnormier commented 2 months ago

The Java formatting in some files is very very strange.

For example: https://github.com/zeroc-ice/ice/blob/290d5292b08d83614f907dea9ad324d1687499d7/java/src/IceGridGUI/src/main/java/com/zeroc/IceGridGUI/Coordinator.java#L1983

InsertCreativityHere commented 2 months ago

The cause of the strangeness is that the formatting plug-in we're using has a hard column limit of 100. So, in heavily nested code like what you posted, where the entire block is very near to that 100 column limit, the formatter starts doing crazy things to try and avoid hitting that limit.

We could switch to a different formatter that lets us set a higher upper limit of 120. Or go back to manually formatting the code in this file instead of relying on janky auto-formatters.