(Translated by https://www.hiragana.jp/)
Code Style · knowm/XChange Wiki · GitHub
Skip to content
Donald Jackson edited this page Mar 28, 2024 · 8 revisions

Maven

We use the fmt-maven-plugin, which can be invoked at the command line via:

mvn com.spotify.fmt:fmt-maven-plugin:format

Formats your code using google-java-format which follows Google's code styleguide.

If you want your IDE to stick to the same format, check out the available configuration plugins:

Eclipse

Download google-java-format-eclipse-plugin_*.jar and place in /Applications/Eclipse Java.app/Contents/Eclipse/dropins. Restart Eclipse. Select the plugin in Preferences > Java > Code Style > Formatter > Formatter Implementation.

IntelliJ

In the plugins section in IntelliJ search for google-java-format and install the plugin. Restart IntelliJ.