From fb9e4197c152e48174854a0b10053969debb9a50 Mon Sep 17 00:00:00 2001 From: JUUL Mobile Bot Date: Tue, 24 Oct 2023 10:04:44 -0700 Subject: [PATCH] Update plugin kotlinter to v4 (#239) --- .editorconfig | 8 ++++++++ compile/src/main/kotlin/Logging.kt | 1 + compile/src/main/kotlin/read/AsReceiver.kt | 1 + gradle/libs.versions.toml | 2 +- 4 files changed, 11 insertions(+), 1 deletion(-) diff --git a/.editorconfig b/.editorconfig index 91fe5a0..465f241 100644 --- a/.editorconfig +++ b/.editorconfig @@ -1,3 +1,11 @@ [*.{kt,kts}] ij_kotlin_allow_trailing_comma = true ij_kotlin_allow_trailing_comma_on_call_site = true + +ktlint_standard_function-signature = disabled +ktlint_standard_no-blank-line-in-list = disabled +ktlint_standard_no-empty-first-line-in-class-body = disabled + +# `string-template-indent` is disabled because it depends on `multiline-expression-wrapping`. +ktlint_standard_multiline-expression-wrapping = disabled +ktlint_standard_string-template-indent = disabled diff --git a/compile/src/main/kotlin/Logging.kt b/compile/src/main/kotlin/Logging.kt index 384b9d9..aa70531 100644 --- a/compile/src/main/kotlin/Logging.kt +++ b/compile/src/main/kotlin/Logging.kt @@ -46,5 +46,6 @@ internal class KspTuulboxLogger( } override fun hashCode(): Int = backend.hashCode() + override fun equals(other: Any?): Boolean = other is KspTuulboxLogger && backend == other.backend } diff --git a/compile/src/main/kotlin/read/AsReceiver.kt b/compile/src/main/kotlin/read/AsReceiver.kt index 2b41b9c..c607368 100644 --- a/compile/src/main/kotlin/read/AsReceiver.kt +++ b/compile/src/main/kotlin/read/AsReceiver.kt @@ -37,6 +37,7 @@ internal fun KSClassDeclaration.asReceiver(): Receiver { } else -> { val message = buildString { + @Suppress("ktlint:standard:max-line-length", "ktlint:standard:argument-list-wrapping") append("@Exercise annotated class must be a subclass of Activity, Fragment, or Service; or, must also be annotated @AsStub. Found classes:") for (superClass in superClasses) { append("\n ", superClass) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 81d6e30..96f7636 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -19,6 +19,6 @@ android-application = { id = "com.android.application", version.ref = "agp" } android-library = { id = "com.android.library", version.ref = "agp" } dokka = { id = "org.jetbrains.dokka", version = "1.9.0" } kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" } -kotlinter = { id = "org.jmailen.kotlinter", version = "3.16.0" } +kotlinter = { id = "org.jmailen.kotlinter", version = "4.0.0" } maven-publish = { id = "com.vanniktech.maven.publish", version = "0.25.3" } validator = { id = "binary-compatibility-validator", version = "0.13.0" }