-
Notifications
You must be signed in to change notification settings - Fork 305
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 #290
Comments
@deepankarb Should I give this issue a shot if you haven't started working on it yet, because I want to acquaint myself with the project codebase and therefore finding some ways to contribute and learn |
Apologies @deepankarb and @s-ayush2903... I was just finishing #294 which I just linked here. I've compared ktfmt, ktlint, and diktat. One really cool thing about spotless which we use is that you can use multiple linters (it's a linter aggregator). So we can totally use ktlint and ktfmt as well as diktat all together to benefit from their different strengths. As an example, I've discovered that ktlint enforces the no-wildcard rule where ktfmt doesn't do anything about wildcards. So it's a good reason to keep ktlint. But why ktfmt, and why the google-java-format? After experimenting with it, the rectangle rule among other things really stood out for me as a good exmaple of how this style guide produces really neat and readable code. The philosophy of ktfmt is also that the developer shouldn't worry about formatting, which is great. I will update the developer's guide to add a section to configure the ktfmt plugin for AndroidStudio. |
Start using https://github.com/facebookincubator/ktfmt
Under this issue please do the following
build.gradle
file to use ktfmt (if we're going ahead with this) and potentially converting some existing codeThank you!
The text was updated successfully, but these errors were encountered: