-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Feature/craig/lint checking #833
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
Conversation
|
@CDRussell thanks for submitting this, it's a great addition. I've got a couple of questions:
|
It should be mostly the same, though i'm sure we'll find some further tweaks required at some point. As a result of the commits tidying up the existing code, there should be no changes made if you format the entire codebase in Android Studio now. And so any new detections should be valid. The one thing that stood out was that it detected a lot of files didn't end with a new line, which is recommended. I don't know if there's a way to get Android Studio to enforce this too for an even quicker alert.
No, I considered it but wanted to just get the minimum done to start getting value from it. Agree that it's a good addition though, and happy to iterate on it to make it a strong requirement / prerequisite to format the code locally with a git hook etc... |
|
Thanks for the clarification @CDRussell. I can't find that check either (it exists for Java but not for Kotlin) so I agree that this is a good solution for now |
|
Thanks for checking. If it becomes an issue causing lots of noise, we can either:
|
malmstein
left a comment
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.
Discussed this online and after testing the ktlint warnings and formatting this is good to go!
Task/Issue URL: https://app.asana.com/0/488551667048375/1176263457388604
Tech Design URL:
CC:
Description:
Adds ability to automate code formatting checks using
ktlint.Steps to test this PR:
developfirst and run the app. Then install this version to ensure no migration issues from the change (a DB entity class was renamed because it violated the code style)./gradlew ktlintand verify there are no reported violations.ktlintagain. This time, verify the build fails and reports the issue.ℹ️ Note, the Bitrise checks do not yet enforce these rules. There is a new workflow ready to go but I can't switch to using that until this is merged. Once this is merged, I'll configure Bitrise to start failing on new violations.
Internal references:
Software Engineering Expectations
Technical Design Template