Right-click on the project and select Properties > Java Code Style.
Under Clean Up:
- Enable project specific settings
- Import the
cleanup.xmlfile - Select the
Wurst-Imperiumprofile - Click
Apply
Under Code Templates:
- Enable project specific settings
- Import the
templates.xmlfile - Click
Apply
Under Formatter:
- Enable project specific settings
- Import the
formatter.xmlfile - Select the
Wurst-Imperiumprofile - Click
Apply
In the VSCode settings, set java.format.settings.url to:
https://raw.githubusercontent.com/Wurst-Imperium/Wurst7/master/codestyle/formatter.xml
and set java.format.settings.profile to:
Wurst-Imperium
To check if your code is formatted correctly, run:
./gradlew checkIt will say BUILD SUCCESSFUL if your code is formatted correctly or BUILD FAILED if it's not.
To format your code, run:
./gradlew spotlessApplyIf you want to both check the code style and run the automated tests, run:
./gradlew check runEndToEndTest --warning-mode failThis will take about a minute to run.



