-
Notifications
You must be signed in to change notification settings - Fork 24.8k
Kotlin: Set up ktfmt in OSS #52064
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
Kotlin: Set up ktfmt in OSS #52064
Conversation
Summary: Following up from #52064 (comment), this PR removes lint-java and its related files. The codebase is moving entirely to Kotlin and a Kotlin linter is being setup as well, the usage of the Java linter will become unnecessary. ## Changelog: [INTERNAL] - Remove lint-java Pull Request resolved: #52092 Test Plan: Relying on CI here to be green. Reviewed By: cortinico Differential Revision: D76880712 Pulled By: sbuggay fbshipit-source-id: 2736772e7347f435b17d007e0322e1afc2fb2d7b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've tested it and it looks great to me 👍 Just a couple of nits
@cortinico has imported this pull request. If you are a Meta employee, you can view this in D78272876. |
@cortinico merged this pull request in 42b8921. |
This pull request was successfully merged by @mateoguzmana in 42b8921 When will my fix make it into a release? | How to file a pick request? |
Summary:
This PR adds the basic
ktfmt
setup in OSS to lint Kotlin files before they're imported into the Meta codebase, making collaboration with external contributors smoother for Android related PRs.I tried to put together certain rules that mimic the current code style and it seems to work well as I get no errors for properly formatted files but this still might need some input to have the correct configuration.
Added two scripts to the main package.json:
yarn lint-kotlin-check
yarn lint-kotlin
Changelog:
[INTERNAL] - Kotlin: Set up ktfmt in OSS
Test Plan:
Unformat any random Kotlin file inside ReactAndroid and then run: