Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

JLLeitschuh
Copy link
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