From 0546e051833616b7d5a14853f3125f4709650537 Mon Sep 17 00:00:00 2001 From: Graham Date: Sat, 29 Aug 2020 19:03:15 +0100 Subject: [PATCH] Update kotlinter/ktlint Annoyingly, this requires us to disable a different set of rules to work around a different bug! Signed-off-by: Graham --- .editorconfig | 4 ++-- build.gradle.kts | 9 +++++++++ buildSrc/src/main/java/Versions.kt | 2 +- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/.editorconfig b/.editorconfig index 62441a61df..57fe0a802e 100644 --- a/.editorconfig +++ b/.editorconfig @@ -13,9 +13,9 @@ indent_style = tab # @formatter:on indent_style = space indent_size = 4 -# see https://github.com/pinterest/ktlint/issues/527 +# see https://github.com/pinterest/ktlint/issues/764 # noinspection EditorConfigKeyCorrectness -disabled_rules = import-ordering +disabled_rules = indent,parameter-list-wrapping # @formatter:off [*.{xml,yaml,yml}] diff --git a/build.gradle.kts b/build.gradle.kts index 933d7f74b8..039d1cae10 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,5 +1,7 @@ import org.jetbrains.kotlin.gradle.plugin.KotlinPluginWrapper import org.jetbrains.kotlin.gradle.tasks.KotlinCompile +import org.jmailen.gradle.kotlinter.KotlinterExtension +import org.jmailen.gradle.kotlinter.KotlinterPlugin import java.io.ByteArrayOutputStream import java.net.URL @@ -53,6 +55,13 @@ allprojects { } } + plugins.withType { + configure { + // see https://github.com/pinterest/ktlint/issues/764 + disabledRules = arrayOf("indent", "parameter-list-wrapping") + } + } + tasks.withType { options.release.set(11) } diff --git a/buildSrc/src/main/java/Versions.kt b/buildSrc/src/main/java/Versions.kt index a4deaa3451..1e6261886d 100644 --- a/buildSrc/src/main/java/Versions.kt +++ b/buildSrc/src/main/java/Versions.kt @@ -18,7 +18,7 @@ object Versions { const val jimfs = "1.1" const val junit = "5.6.2" const val kotlin = "1.3.72" - const val kotlinter = "2.3.2" + const val kotlinter = "3.0.2" const val logback = "1.2.3" const val netty = "4.1.51.Final" const val openrs2Natives = "2.0.1"