-
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
Changes from all commits
f156a1b
7d6c9bf
727e709
61b8d75
9fbc097
fb11e0e
6d59601
e51e6ec
274726d
8e00639
811780c
4ae3079
75258aa
8007cdd
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,13 +13,22 @@ 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 | ||
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 commentThe reason will be displayed to describe this comment to others. Learn more. ❌ standard:class-signatureFrom official docs:
|
||
ktlint_standard_comment-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 commentThe reason will be displayed to describe this comment to others. Learn more. ❌ standard:function-expression-bodyActually, I like this rule for one-line expressions, but it forces expression body even for multiline expressions. |
||
ktlint_standard_function-signature = disabled | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ❌ standard:function-signatureThis one is similar to |
||
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 commentThe 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 commentThe 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. |
||
ktlint_standard_no-consecutive-comments = enabled | ||
ktlint_standard_no-wildcard-imports = disabled | ||
ktlint_standard_property-naming = disabled | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ❌ standard:property-namingThis 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_standard_trailing-comma-on-call-site = disabled | ||
ktlint_standard_trailing-comma-on-declaration-site = disabled | ||
ktlint_standard_filename = disabled | ||
ktlint_standard_class-naming = disabled | ||
ktlint_standard_annotation = disabled | ||
ktlint_standard_comment-wrapping = disabled | ||
ktlint_standard_try-catch-finally-spacing = enabled | ||
|
||
[*.kts] | ||
# Always use wildcard imports in scripts | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/* | ||
* Copyright 2014-2021 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. | ||
* Copyright 2014-2024 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. | ||
*/ | ||
import org.gradle.api.* | ||
import org.gradle.kotlin.dsl.* | ||
|
@@ -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 commentThe 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 commentThe reason will be displayed to describe this comment to others. Learn more. Yes, the entire source set was unused |
||
val sourceSet = findByName("jvmAndNixMain") ?: getByName("jvmMain") | ||
block(sourceSet) | ||
} | ||
|
||
fun NamedDomainObjectContainer<KotlinSourceSet>.jvmAndNixTest(block: KotlinSourceSet.() -> Unit) { | ||
val sourceSet = findByName("jvmAndNixTest") ?: getByName("jvmTest") | ||
block(sourceSet) | ||
} | ||
|
||
fun NamedDomainObjectContainer<KotlinSourceSet>.nixTest(block: KotlinSourceSet.() -> Unit) { | ||
val sourceSet = findByName("nixTest") ?: return | ||
block(sourceSet) | ||
|
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