-
Notifications
You must be signed in to change notification settings - Fork 16
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 plugin code styling and formatting #281
Add ktlint plugin code styling and formatting #281
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #281 +/- ##
============================================
- Coverage 35.88% 35.74% -0.15%
Complexity 348 348
============================================
Files 101 101
Lines 3035 3047 +12
Branches 184 184
============================================
Hits 1089 1089
- Misses 1826 1838 +12
Partials 120 120
|
…pdate/add_ktlint_plugin
Hello @G10xy
Reference: https://detekt.dev/docs/intro Not sure how to continue with this. At the moment, I'm having an issue that I want detekt to alert on wildcard imports. But somehow, I cannot make this work. Eventually, this works better with pure Best regards, |
After doing a bit of research, I think we should keep I have added two minor comments to your PR. Would be great, if you could fix this.
detekt as a tool should remain in place, we just want to remove the detekt-formatting functionality. |
# Conflicts: # bigbone/build.gradle # bigbone/src/main/kotlin/social/bigbone/api/entity/Conversation.kt # bigbone/src/main/kotlin/social/bigbone/api/entity/Marker.kt # bigbone/src/main/kotlin/social/bigbone/api/entity/MastodonList.kt # bigbone/src/main/kotlin/social/bigbone/api/entity/MediaAttachment.kt # bigbone/src/main/kotlin/social/bigbone/api/entity/PreviewCard.kt # bigbone/src/main/kotlin/social/bigbone/api/entity/Report.kt # bigbone/src/main/kotlin/social/bigbone/api/entity/StatusEdit.kt
Thanks, I honestly did not know so deeply about. |
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.
Everything looks good! Thank you very much 👍
Description
Based on the issue #279 I already used ktlint plugin, in order to mantain a standard about code style and formatting.
Please have check, give it a try.
You can find in the Grandle task at the sub-task formatting.
By running ktlintFormat, the code will be automatically restyled and, in case of .* imports, it will generate a txt file reporting the error.
Some link about:
https://reflectoring.io/code-format-with-ktlint/
https://www.baeldung.com/kotlin/ktlint-code-formatting
Type of Change
How Has This Been Tested?
I run ktlintFormat and checked that it reported all problems about importing and automatically formatting the code style.
I also tested it with gradle check and gradle build and it worked fine everytime.
Checklist