Skip to content
New issue

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

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

Already on GitHub? # to your account

Adopt automated code formatting #27

Open
jmccance opened this issue Apr 29, 2020 · 2 comments
Open

Adopt automated code formatting #27

jmccance opened this issue Apr 29, 2020 · 2 comments

Comments

@jmccance
Copy link

Benefits of automated code formatting:

  • We'll have a standard style, which helps make the codebase more readable for newbies and oldies alike
  • Automation drastically reduces back-and-forth over style; we just go with what the formatter provides
  • Reduces merge conflicts from intentional or accidental formatting changes
  • Reduces noise in PRs from people fixing formatting errors when they find them (or having to submit separate formatting PRs)

I propose we use ktlint.

  • Implements a combination of the official Kotlin and Android style guides.
  • Formatters available for major editors, including IntellIJ, Emacs, and Vim
  • Minimally configurable, which helps keep us from bikeshedding over small style choices
  • A number of options for Gradle integration. (I usually just re-use a simple buildSrc plugin I wrote.)
@jmccance
Copy link
Author

I can add this very quickly, but would like to wait for #26 to be merged first.

@mihn
Copy link

mihn commented Apr 29, 2020

👍🏼for automating this.

@jmccance jmccance mentioned this issue Apr 30, 2020
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants