From 5e2dec3a95faa959568d098d1ade0747858d95ed Mon Sep 17 00:00:00 2001 From: friendlyanon Date: Wed, 8 Apr 2020 17:56:44 +0200 Subject: [PATCH] Disable ktlint rule that always causes issues See https://github.com/pinterest/ktlint/issues/527 --- .editorconfig | 2 +- build.gradle.kts | 2 +- src/main/kotlin/gateway/controller/Main.kt | 2 +- src/main/kotlin/gateway/controller/Master.kt | 2 +- src/main/kotlin/gateway/controller/server/Server.kt | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.editorconfig b/.editorconfig index 19d05ee..0d2c866 100644 --- a/.editorconfig +++ b/.editorconfig @@ -20,4 +20,4 @@ end_of_line = crlf # noinspection EditorConfigKeyCorrectness [*.kt] insert_final_newline = true -disabled_rules = no-wildcard-imports +disabled_rules = no-wildcard-imports, import-ordering diff --git a/build.gradle.kts b/build.gradle.kts index 1a182cc..e203cf5 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -2,8 +2,8 @@ import com.github.jengelman.gradle.plugins.shadow.tasks.ConfigureShadowRelocation import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar -import java.util.jar.Attributes.Name.* import org.jlleitschuh.gradle.ktlint.reporter.ReporterType +import java.util.jar.Attributes.Name.* plugins { val ktlintVersion = "9.2.1" diff --git a/src/main/kotlin/gateway/controller/Main.kt b/src/main/kotlin/gateway/controller/Main.kt index 00b81cb..f2df9d4 100644 --- a/src/main/kotlin/gateway/controller/Main.kt +++ b/src/main/kotlin/gateway/controller/Main.kt @@ -1,9 +1,9 @@ package gateway.controller import gateway.controller.database.DbWrapper +import org.mapdb.DBMaker import java.io.File import kotlin.system.exitProcess -import org.mapdb.DBMaker private fun usage(): Nothing { println( diff --git a/src/main/kotlin/gateway/controller/Master.kt b/src/main/kotlin/gateway/controller/Master.kt index 131b9f4..1f51999 100644 --- a/src/main/kotlin/gateway/controller/Master.kt +++ b/src/main/kotlin/gateway/controller/Master.kt @@ -9,9 +9,9 @@ import gateway.controller.utils.simpleName import gateway.controller.workers.Orchestrator import gateway.controller.workers.WebApi import gateway.controller.workers.WorkerContainer +import org.slf4j.LoggerFactory import kotlin.concurrent.thread import kotlin.system.exitProcess -import org.slf4j.LoggerFactory class Master(port: Int, val localStorage: DbWrapper) : Runnable { val webApi: WorkerContainer diff --git a/src/main/kotlin/gateway/controller/server/Server.kt b/src/main/kotlin/gateway/controller/server/Server.kt index 28d591f..f79629b 100644 --- a/src/main/kotlin/gateway/controller/server/Server.kt +++ b/src/main/kotlin/gateway/controller/server/Server.kt @@ -6,10 +6,10 @@ import gateway.controller.events.EventException import gateway.controller.events.master.CommandEvent import gateway.controller.events.master.InquireStatusEvent import gateway.controller.events.webapi.StatusEvent -import gateway.controller.server.models.Command as CommandModel import gateway.controller.utils.Queue import gateway.controller.utils.cast import gateway.controller.workers.WebApi +import gateway.controller.server.models.Command as CommandModel class Server(private val parent: WebApi, port: Int) : NanoHTTPD(port) { private val mapper = jacksonObjectMapper()