Skip to content

Add spotless to gradle build for format linting and reformatting#188

Open
JLLeitschuh wants to merge 2 commits intocbeust:masterfrom
JLLeitschuh:format-with-spotless
Open

Add spotless to gradle build for format linting and reformatting#188
JLLeitschuh wants to merge 2 commits intocbeust:masterfrom
JLLeitschuh:format-with-spotless

Conversation

@JLLeitschuh
Copy link
Copy Markdown
Contributor

@JLLeitschuh JLLeitschuh commented Sep 13, 2018

This adds the gradle plugin spotless to the build:
https://github.com/diffplug/spotless

With it comes the kotlin formatter ktlint:
https://github.com/shyiko/ktlint

To check if your code is formatted correctly you can run the task spotlessCheck.
To reformat your code to fix any formatting issues, you can run spotlessApply.

The task spotlessCheck is always run as a part of the check task meaning that it is run as part of travis.

It also handles the formatting of the *.gradle.kts files as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant