From 0cf11ac63c0aeddb0bbff64ee0d54052b5f8bb1b Mon Sep 17 00:00:00 2001 From: Travis Wyatt Date: Mon, 23 Oct 2023 01:11:10 -0700 Subject: [PATCH] Disabled undesired new ktlint rules --- .editorconfig | 8 ++++++++ compile/src/main/kotlin/Logging.kt | 1 + compile/src/main/kotlin/read/AsReceiver.kt | 1 + 3 files changed, 10 insertions(+) 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)