From 6b13d7898cfabadb41373a7ce72dd227522e628c Mon Sep 17 00:00:00 2001 From: Niklas Baudy Date: Wed, 15 May 2024 16:50:32 +0800 Subject: [PATCH] Technical: Update ktlint to 1.2.1 (#310) --- .editorconfig | 6 ++++-- build.gradle | 2 +- .../code/quality/tools/CodeQualityToolsPlugin.kt | 12 +++++------- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.editorconfig b/.editorconfig index 8527b5f..b0a62b0 100644 --- a/.editorconfig +++ b/.editorconfig @@ -8,7 +8,9 @@ insert_final_newline=true ktlint_standard_annotation=disabled ktlint_standard_max-line-length=disabled ktlint_standard_filename=disabled -ktlint_standard_discouraged-comment-location=disabled -ktlint_standard_class-signature=disabled ktlint_standard_spacing-between-declarations-with-annotations=disabled +ktlint_standard_blank-line-between-when-conditions=disabled +ktlint_standard_backing-property-naming=disabled +ktlint_standard_kdoc=disabled +ktlint_standard_condition-wrapping=disabled ktlint_experimental=enabled \ No newline at end of file diff --git a/build.gradle b/build.gradle index 073a8bf..2936e1c 100755 --- a/build.gradle +++ b/build.gradle @@ -30,7 +30,7 @@ validatePlugins { codeQualityTools { ktlint { - toolVersion = '1.0.1' + toolVersion = '1.2.1' } detekt { enabled = false diff --git a/src/main/kotlin/com/vanniktech/code/quality/tools/CodeQualityToolsPlugin.kt b/src/main/kotlin/com/vanniktech/code/quality/tools/CodeQualityToolsPlugin.kt index 0d8b9b9..56e7024 100755 --- a/src/main/kotlin/com/vanniktech/code/quality/tools/CodeQualityToolsPlugin.kt +++ b/src/main/kotlin/com/vanniktech/code/quality/tools/CodeQualityToolsPlugin.kt @@ -52,13 +52,11 @@ class CodeQualityToolsPlugin : Plugin { } } -fun hasLintPlugin(): Boolean { - return try { - Class.forName("com.android.build.gradle.LintPlugin") - true - } catch (ignored: ClassNotFoundException) { - false - } +fun hasLintPlugin(): Boolean = try { + Class.forName("com.android.build.gradle.LintPlugin") + true +} catch (ignored: ClassNotFoundException) { + false } fun Project.kotlinFiles(baseDir: String? = null) =