This repository was archived by the owner on Jun 21, 2019. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I've added the spotless plugin for code formatting to the project. Travis-CI fails, if the formatting of a file does not comply to the code style settings.
I've tried to find formatting settings, that fit the current project, so that as few changes to the existing files have to be done as possible.
By executing the gradle task spotlessApply, the files are automatically formatted. At the moment, the user has to run this task by himself.
Auto formatting in Eclipse
Spotless internally uses Eclipses formatter, so Eclipse users could just import the code formatter options and the import order file from the projects base directory and use Eclipse's save actions to automatically apply the formatting on every save. I expect this to work pretty flawlessly, but I haven't tested this.
Auto formatting in Intellij Idea
For users of Idea I see only two options for automatic formatting, both of them are probably not ideal (suggestions for better solutions are very welcome):