-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Update dependency org.jmailen.gradle:kotlinter-gradle to v4 #4488
Conversation
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.
We should fix new rules violations before merging this
0a98950
to
2c67639
Compare
Edited/Blocked NotificationRenovate will not automatically rebase this PR, because it does not recognize the last commit author and assumes somebody else may have edited the PR. You can manually request rebase by checking the rebase/retry box above. |
2c67639
to
60befa6
Compare
0429d45
to
6e27042
Compare
Finished with fixing style problems here. Feel free to review this PR! |
6e27042
to
cf05f00
Compare
.editorconfig
Outdated
ktlint_standard_annotation = disabled | ||
ktlint_standard_class-naming = disabled | ||
ktlint_standard_class-signature = disabled | ||
ktlint_standard_comment-wrapping = disabled | ||
ktlint_standard_condition-wrapping = disabled | ||
ktlint_standard_filename = disabled | ||
ktlint_standard_function-expression-body = disabled | ||
ktlint_standard_function-signature = disabled |
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.
Here you can find examples with findings for the disabled rules
ktlint_standard_no-wildcard-imports = disabled | ||
ktlint_standard_property-naming = disabled |
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.
❌ standard:property-naming
This rule doesn't like constants starting written in CamelCase. And we have a lot of such constants:
public object AuthScheme {
public const val Basic: String = "Basic"
ktlint_code_style = intellij_idea | ||
ktlint_standard_annotation = disabled | ||
ktlint_standard_class-naming = disabled | ||
ktlint_standard_class-signature = disabled |
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.
❌ standard:class-signature
From official docs:
For code styles
android_studio
andintellij_idea
this rule rewrites multiline class signature to a single line class signature in case the entire class signature fits on a single line by default. In case you want to leave it to the discretion of the developer to decider whether a single or a multiline class signature is used, please suppress or disable this rule.
ktlint_standard_condition-wrapping = disabled | ||
ktlint_standard_filename = disabled | ||
ktlint_standard_function-expression-body = disabled | ||
ktlint_standard_function-signature = disabled |
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.
❌ standard:function-signature
This one is similar to class-signature
but for functions and with the same problems.
ktlint_standard_comment-wrapping = disabled | ||
ktlint_standard_condition-wrapping = disabled | ||
ktlint_standard_filename = disabled | ||
ktlint_standard_function-expression-body = disabled |
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.
❌ standard:function-expression-body
Actually, I like this rule for one-line expressions, but it forces expression body even for multiline expressions.
@@ -13,13 +13,23 @@ indent_size = 2 | |||
ij_kotlin_code_style_defaults = KOTLIN_OFFICIAL | |||
ij_kotlin_packages_to_use_import_on_demand = java.util.*, io.ktor.** | |||
|
|||
ktlint_code_style = intellij_idea |
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.
Use defaults from the Kotlin Coding Conventions
Enormous work! Good job on this, LGTM |
@@ -47,16 +47,6 @@ fun NamedDomainObjectContainer<KotlinSourceSet>.jvmAndPosixTest(block: KotlinSou | |||
block(sourceSet) | |||
} | |||
|
|||
fun NamedDomainObjectContainer<KotlinSourceSet>.jvmAndNixMain(block: KotlinSourceSet.() -> Unit) { |
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.
Is it deleted because it isn't used?
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.
Yes, the entire source set was unused
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.
Great work 🚀
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.
ktlint_standard_function-expression-body = disabled | ||
ktlint_standard_function-signature = disabled | ||
ktlint_standard_if-else-bracing = enabled | ||
ktlint_standard_if-else-wrapping = enabled |
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 don't care for the if-else rules 👎
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.
The only reason why I've enabled these rules is that we've had only 19 violations of them. So it seems reasonable to enable them as we aligned to them anyway.
Let's leave the rules enabled and disable them if they get in the way.
cf05f00
to
f195f0f
Compare
f195f0f
to
7f44fa2
Compare
7f44fa2
to
8007cdd
Compare
This PR contains the following updates:
3.15.0
->4.5.0
Release Notes
jeremymailen/kotlinter-gradle (org.jmailen.gradle:kotlinter-gradle)
v4.5.0
Compare Source
v4.4.1
Compare Source
v4.4.0
Compare Source
ktlint 1.3.0 introduces some significant formatting rule changes, so you may find applying this newer version will introduce a lot of changes.
v4.3.0
Compare Source
Upgrade to ktlint 1.2.1
v4.2.0
Compare Source
Note: compatibility matrix has upgraded to require minimum of Kotlin 1.9.20.
v4.1.1
Compare Source
Small release, but two important fixes:
v4.1.0
Compare Source
New feature to
failBuildWhenCannotAutoFormat
for the formatKotlin task - thanks @acreddy9See new configuration options here.
v4.0.1
Compare Source
Update to ktlint 1.0.1
v4.0.0
Compare Source
Upgrade to ktlint 1.0.0
v3.16.0
Compare Source
This release upgrades to ktlint 0.50.0.
Please read the linked release notes to learn about new features and fixes.
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.