eclipse-lyo / lyo

Eclipse Lyo, a Java SDK for OSLC-based tool integration
https://oslc.github.io/developing-oslc-applications/eclipse_lyo/eclipse-lyo.html
Eclipse Public License 2.0
17 stars 17 forks source link

Enforce common code style and formatting #651

Open berezovskyi opened 6 days ago

berezovskyi commented 6 days ago

This will be easier in the long run

https://github.com/google/google-java-format is the only tool that I found that works both in Eclipse and IntelliJ.

Maven integration may make things easy via https://github.com/diffplug/spotless/tree/main/plugin-maven#google-java-format (+ can enforce/check other things). Alternatively, https://github.com/spotify/fmt-maven-plugin - also uses google-java-format under the hood.

Ideally add a CI check/fixer - https://github.com/axel-op/googlejavaformat-action should work in the --set-exit-if-changed mode for us, I guess.

berezovskyi commented 5 days ago

Starting small with https://github.com/OSLC/lyo-samples/pull/171