From 1e2a4f657ba148a62fe58ca0ff0a24056b91be2d Mon Sep 17 00:00:00 2001 From: Patrick Hoefer Date: Fri, 18 Dec 2020 23:05:36 +0100 Subject: [PATCH] fix(linter): fix linter issues --- build.gradle.kts | 4 ++-- .../com/github/xetra11/ck3workbench/app/view/DialogView.kt | 4 ++-- .../module/character/exporter/CharacterScriptExporter.kt | 2 +- src/main/kotlin/main.kt | 2 +- .../com/github/xetra11/ck3workbench/app/SessionManagerTest.kt | 1 - .../module/character/exporter/CharacterScriptExporterTest.kt | 2 -- 6 files changed, 6 insertions(+), 9 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 57513b5..fb2f430 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -44,10 +44,10 @@ dependencies { tasks.test { useJUnitPlatform() testLogging { - events ("passed", "skipped", "failed") //, "standardOut", "standardError" + events("passed", "skipped", "failed") // , "standardOut", "standardError" showExceptions = true - //exceptionFormat = "full" + // exceptionFormat = "full" showCauses = true showStackTraces = true showStandardStreams = false diff --git a/src/main/kotlin/com/github/xetra11/ck3workbench/app/view/DialogView.kt b/src/main/kotlin/com/github/xetra11/ck3workbench/app/view/DialogView.kt index 8130426..9c794e1 100644 --- a/src/main/kotlin/com/github/xetra11/ck3workbench/app/view/DialogView.kt +++ b/src/main/kotlin/com/github/xetra11/ck3workbench/app/view/DialogView.kt @@ -5,7 +5,6 @@ import androidx.compose.foundation.border import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.fillMaxSize -import androidx.compose.foundation.layout.preferredSize import androidx.compose.material.AlertDialog import androidx.compose.material.Text import androidx.compose.runtime.Composable @@ -64,7 +63,8 @@ private fun ExportCharacterDialog() { val characterScriptExporter = CharacterScriptExporter() characterScriptExporter.export() NotificationsService.notify("""Characters have been exported to "character.txt"""") - }) { BasicButtonText("Export") } + } + ) { BasicButtonText("Export") } }, dismissButton = { BasicButton(onClick = { AppManager.focusedWindow?.close() }) { BasicButtonText("Cancel") } diff --git a/src/main/kotlin/com/github/xetra11/ck3workbench/module/character/exporter/CharacterScriptExporter.kt b/src/main/kotlin/com/github/xetra11/ck3workbench/module/character/exporter/CharacterScriptExporter.kt index a9bd968..d99c09a 100644 --- a/src/main/kotlin/com/github/xetra11/ck3workbench/module/character/exporter/CharacterScriptExporter.kt +++ b/src/main/kotlin/com/github/xetra11/ck3workbench/module/character/exporter/CharacterScriptExporter.kt @@ -34,7 +34,7 @@ $index = { ${character.birth.toDateAttribute("birth")} ${character.death.toDateAttribute("death")} } -""".trimIndent() + """.trimIndent() }.joinToString(separator = "") { it + "\n\n" } } diff --git a/src/main/kotlin/main.kt b/src/main/kotlin/main.kt index 147150c..39a66b3 100644 --- a/src/main/kotlin/main.kt +++ b/src/main/kotlin/main.kt @@ -60,7 +60,7 @@ fun main() = invokeLater { MenuItem( "Export Character Scripts", onClick = { - DialogManager.openDialog(DialogManager.Dialog.CHARACTER_EXPORT) + DialogManager.openDialog(DialogManager.Dialog.CHARACTER_EXPORT) } ), ), diff --git a/src/test/kotlin/com/github/xetra11/ck3workbench/app/SessionManagerTest.kt b/src/test/kotlin/com/github/xetra11/ck3workbench/app/SessionManagerTest.kt index ec0a421..eb22384 100644 --- a/src/test/kotlin/com/github/xetra11/ck3workbench/app/SessionManagerTest.kt +++ b/src/test/kotlin/com/github/xetra11/ck3workbench/app/SessionManagerTest.kt @@ -1,6 +1,5 @@ package com.github.xetra11.ck3workbench.app -import androidx.compose.desktop.AppManager import com.github.xetra11.ck3workbench.module.character.CharacterTemplate import io.kotest.core.spec.style.ShouldSpec import io.kotest.matchers.collections.shouldHaveSize diff --git a/src/test/kotlin/com/github/xetra11/ck3workbench/module/character/exporter/CharacterScriptExporterTest.kt b/src/test/kotlin/com/github/xetra11/ck3workbench/module/character/exporter/CharacterScriptExporterTest.kt index 8e53a3b..18d7234 100644 --- a/src/test/kotlin/com/github/xetra11/ck3workbench/module/character/exporter/CharacterScriptExporterTest.kt +++ b/src/test/kotlin/com/github/xetra11/ck3workbench/module/character/exporter/CharacterScriptExporterTest.kt @@ -4,7 +4,6 @@ import com.github.xetra11.ck3workbench.app.StateManager import com.github.xetra11.ck3workbench.module.character.CharacterTemplate import io.kotest.core.spec.style.ShouldSpec import io.kotest.matchers.shouldBe -import io.kotest.matchers.string.shouldContain import java.io.File class CharacterScriptExporterTest : ShouldSpec({ @@ -25,4 +24,3 @@ class CharacterScriptExporterTest : ShouldSpec({ exportFile.readText() shouldBe expectedExportFile.readText() } }) -