From 0891709197e00f38a7408ee3da8fec6cc4732d8a Mon Sep 17 00:00:00 2001 From: sciencesakura Date: Thu, 21 Mar 2024 22:23:42 +0900 Subject: [PATCH] Fix ktlint violations --- .../sciencesakura/dbsetup/spreadsheet/Functions.kt | 5 ++++- .../sciencesakura/dbsetup/spreadsheet/ExcelTest.kt | 13 +++++++------ 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/kotlin/src/main/kotlin/com/sciencesakura/dbsetup/spreadsheet/Functions.kt b/kotlin/src/main/kotlin/com/sciencesakura/dbsetup/spreadsheet/Functions.kt index 77ab954..1f72432 100644 --- a/kotlin/src/main/kotlin/com/sciencesakura/dbsetup/spreadsheet/Functions.kt +++ b/kotlin/src/main/kotlin/com/sciencesakura/dbsetup/spreadsheet/Functions.kt @@ -42,7 +42,10 @@ fun DbSetupBuilder.excel(location: String) { * @param configure the function used to configure the Excel import * @throws IllegalArgumentException if the source file was not found */ -fun DbSetupBuilder.excel(location: String, configure: Import.Builder.() -> Unit) { +fun DbSetupBuilder.excel( + location: String, + configure: Import.Builder.() -> Unit, +) { val excelBuilder = Import.excel(location) excelBuilder.configure() execute(excelBuilder.build()) diff --git a/kotlin/src/test/kotlin/com/sciencesakura/dbsetup/spreadsheet/ExcelTest.kt b/kotlin/src/test/kotlin/com/sciencesakura/dbsetup/spreadsheet/ExcelTest.kt index 4eb4fd3..cda2032 100644 --- a/kotlin/src/test/kotlin/com/sciencesakura/dbsetup/spreadsheet/ExcelTest.kt +++ b/kotlin/src/test/kotlin/com/sciencesakura/dbsetup/spreadsheet/ExcelTest.kt @@ -32,7 +32,6 @@ import org.junit.jupiter.api.BeforeEach import org.junit.jupiter.api.Test class ExcelTest { - val url = "jdbc:h2:mem:test;DB_CLOSE_DELAY=-1" val username = "sa" @@ -43,20 +42,22 @@ class ExcelTest { @BeforeEach fun setUp() { - val table_11 = """ + val table11 = + """ create table if not exists table_11 ( id integer primary key, name varchar(100) ) - """.trimIndent() - val table_12 = """ + """.trimIndent() + val table12 = + """ create table if not exists table_12 ( id integer primary key, name varchar(100) ) - """.trimIndent() + """.trimIndent() dbSetup(destination) { - sql(table_11, table_12) + sql(table11, table12) truncate("table_11", "table_12") }.launch() }