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

Use ktfmt in spotless and switch (back) to google-java-format #294

Merged
merged 3 commits into from
Mar 10, 2021

Conversation

jingtang10
Copy link
Collaborator

@jingtang10 jingtang10 commented Mar 9, 2021

After trying out a few different linter options in spotless (see documentation) and using a few different IDE plugins available for kotlin formatting in Android Studio, I've really seen the advantages of using ktfmt but decided to keep also ktlint in the list of linters in spotless (you can use multiple linters).

The documentation here explains quite well why they decided to use google-java-format, not the least because of the rectangle rule. It's very deterministic, which means it really takes formatting away as a concern for the developer.

See the linked issue for a bit more background.

Copy link
Collaborator

@joiskash joiskash left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is awesome!

@jingtang10
Copy link
Collaborator Author

thanks @MuhammadSalman-7214 and @joiskash for taking a look.

To other reviewers, if there's too much to go through, please focus on the non-kotlin files. Namely, the ci.yml, build.gradle and deps.gradle are the only 3 files that are interesting. the kt files have been reformatted automatically. thanks!

@jingtang10 jingtang10 linked an issue Mar 10, 2021 that may be closed by this pull request
@jingtang10
Copy link
Collaborator Author

changing java version used in github action which might have an impact on the integration tests

@jingtang10 jingtang10 linked an issue Mar 18, 2021 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Use ktfmt Integration test out of memory for API 29
4 participants