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 ktlint #11

Conversation

ychescale9
Copy link
Contributor

@ychescale9 ychescale9 commented Dec 9, 2019

Resolves #10

PR adds ktlint throught the ktlint-gradle plugin.

I've fixed all issues reported by the default rules (except import-ordering which is inconsistent with Android Studio). Let me know if you want any specific rules disabled.

I also updated all dependencies in a separate commit and cleaned up unused ones.
Update: I'll do this in a separate PR as suggested.

Tested with ./gradlew assemble check.

There are still a bunch of kotlin compiler warnings e.g. missing @ExperimentalCoroutinesApi annotations which I can address in a separate PR.

@ychescale9
Copy link
Contributor Author

I signed the CLA.

@yigit
Copy link
Collaborator

yigit commented Dec 9, 2019

amazing, thank you!
can we add whatever check to the circle configuration as well so that we don't break this again.
Also, might be good to clear spotless or just limit it to copyright check?

@ychescale9
Copy link
Contributor Author

I saw #5 and thought you might be switching to travis soon. But I'll update the circle ci config anyway.

Re. spotless I'll wait and see what @digitalbuddha thinks.

Copy link
Collaborator

@changusmc changusmc left a comment

Choose a reason for hiding this comment

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

@yarivkenan Thanks for the PR, would you mind splitting up "Add ktlint" and "Update dependencies" into separate PRs?

For the "Add ktlin" PR, can you update https://github.com/dropbox/Store/blob/master/CONTRIBUTING.md#coding-style to ask contributors apply Ktlint to either IntelliJ or githooks (i'm not sure which is better)

https://github.com/JLLeitschuh/ktlint-gradle#additional-helper-tasks

@ychescale9 ychescale9 changed the title Add ktlint and update dependencies Add ktlint Dec 10, 2019
@digitalbuddha
Copy link
Contributor

Thank you for the contribution!

@ychescale9
Copy link
Contributor Author

Rebased with the following changes:

  • reverted dependency updates (will create a separate PR)
  • added instruction for generating IDE style files for ktlint
  • applied ktlint plugin to allprojects instead of subprojects as ktlintApplyToIdea task is only added to the root project.

@digitalbuddha digitalbuddha merged commit 8ddbe3c into MobileNativeFoundation:master Dec 10, 2019
@digitalbuddha
Copy link
Contributor

Do you mind doing the other diff you had as well? We can use some upgrades of dependencies :-)

@ychescale9
Copy link
Contributor Author

yep, hang on for a minute.

@ychescale9 ychescale9 deleted the yc/add-ktlint-and-update-deps branch December 10, 2019 15:54
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.

[help wanted] Add ktlint
4 participants