From 23785e0aabe60fd72a7c06a424709f76a3c95e04 Mon Sep 17 00:00:00 2001 From: Severn Everett Date: Tue, 16 Apr 2024 14:04:53 +0200 Subject: [PATCH] Fix Spotless issues --- .../oshai/kotlinlogging/internal/KLoggerNameResolver.kt | 8 +++----- .../io/github/oshai/kotlinlogging/SimpleWasmJsTest.kt | 4 ++-- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/wasmJsMain/kotlin/io/github/oshai/kotlinlogging/internal/KLoggerNameResolver.kt b/src/wasmJsMain/kotlin/io/github/oshai/kotlinlogging/internal/KLoggerNameResolver.kt index ff6e37d..412831c 100644 --- a/src/wasmJsMain/kotlin/io/github/oshai/kotlinlogging/internal/KLoggerNameResolver.kt +++ b/src/wasmJsMain/kotlin/io/github/oshai/kotlinlogging/internal/KLoggerNameResolver.kt @@ -18,10 +18,8 @@ internal actual object KLoggerNameResolver { } private fun getInvokingClass(line: String): String { - return topLevelPropertyRegex.find(line)?.let { - it.groupValues[1].split(".").last() - } ?: classPropertyRegex.find(line)?.let { - it.groupValues[1].split(".").last() - } ?: NO_CLASS + return topLevelPropertyRegex.find(line)?.let { it.groupValues[1].split(".").last() } + ?: classPropertyRegex.find(line)?.let { it.groupValues[1].split(".").last() } + ?: NO_CLASS } } diff --git a/src/wasmJsTest/kotlin/io/github/oshai/kotlinlogging/SimpleWasmJsTest.kt b/src/wasmJsTest/kotlin/io/github/oshai/kotlinlogging/SimpleWasmJsTest.kt index a462969..8a762fd 100644 --- a/src/wasmJsTest/kotlin/io/github/oshai/kotlinlogging/SimpleWasmJsTest.kt +++ b/src/wasmJsTest/kotlin/io/github/oshai/kotlinlogging/SimpleWasmJsTest.kt @@ -3,11 +3,11 @@ package io.github.oshai.kotlinlogging import kotlin.test.* private val namedLogger = KotlinLogging.logger("SimpleWasmJsTest") -private val anonymousFilePropLogger = KotlinLogging.logger { } +private val anonymousFilePropLogger = KotlinLogging.logger {} class SimpleWasmJsTest { private lateinit var appender: SimpleAppender - private val anonymousClassPropLogger = KotlinLogging.logger { } + private val anonymousClassPropLogger = KotlinLogging.logger {} @BeforeTest fun setup() {