diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..46e6f53 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,7 @@ +root = true + +[*.{kt,kts}] +indent_size = 4 +insert_final_newline = true + +ktlint_standard_no-empty-first-line-in-class-body = disabled diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 6d3da7b..2748e56 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -28,5 +28,5 @@ compose = [ android-application = { id = "com.android.application", version.ref = "agp" } android-library = { id = "com.android.library", version.ref = "agp" } kotlin-multiplatform = { id = "org.jetbrains.kotlin.multiplatform", version = "1.9.20" } -kotlinter = { id = "org.jmailen.kotlinter", version = "3.16.0" } +kotlinter = { id = "org.jmailen.kotlinter", version = "4.1.0" } swiftpackage = { id = "io.github.luca992.multiplatform-swiftpackage", version = "2.2.0" } diff --git a/library/src/androidMain/kotlin/Configuration.kt b/library/src/androidMain/kotlin/Configuration.kt index d7e5935..0cc7d7b 100644 --- a/library/src/androidMain/kotlin/Configuration.kt +++ b/library/src/androidMain/kotlin/Configuration.kt @@ -3,8 +3,9 @@ package com.juul.datadog.sample import com.juul.datadog.Configuration import com.juul.datadog.Site.US1 -public actual val configuration: Configuration = Configuration( - clientToken = DATADOG_CLIENT_TOKEN, - site = US1, - environment = "staging", -) +public actual val configuration: Configuration = + Configuration( + clientToken = DATADOG_CLIENT_TOKEN, + site = US1, + environment = "staging", + ) diff --git a/library/src/commonMain/kotlin/Logger.kt b/library/src/commonMain/kotlin/Logger.kt index 2f19654..33bf36d 100644 --- a/library/src/commonMain/kotlin/Logger.kt +++ b/library/src/commonMain/kotlin/Logger.kt @@ -8,7 +8,10 @@ public fun info(message: String) { logger.info(message, mapOf("from" to "lib")) } -public fun testException(message: String, exceptionMessage: String) { +public fun testException( + message: String, + exceptionMessage: String, +) { try { error(exceptionMessage) } catch (e: Exception) { diff --git a/library/src/iosMain/kotlin/Configuration.kt b/library/src/iosMain/kotlin/Configuration.kt index 2ed662d..45bb072 100644 --- a/library/src/iosMain/kotlin/Configuration.kt +++ b/library/src/iosMain/kotlin/Configuration.kt @@ -3,9 +3,10 @@ package com.juul.datadog.sample import com.juul.datadog.Configuration import com.juul.datadog.Site.US1 -public actual val configuration: Configuration = Configuration( - clientToken = DATADOG_CLIENT_TOKEN, - site = US1, - environment = "staging", - service = "com.juul.datadog.sample.ios", -) +public actual val configuration: Configuration = + Configuration( + clientToken = DATADOG_CLIENT_TOKEN, + site = US1, + environment = "staging", + service = "com.juul.datadog.sample.ios", + ) diff --git a/library/src/jsMain/kotlin/Configuration.kt b/library/src/jsMain/kotlin/Configuration.kt index adec28b..59252ae 100644 --- a/library/src/jsMain/kotlin/Configuration.kt +++ b/library/src/jsMain/kotlin/Configuration.kt @@ -3,10 +3,11 @@ package com.juul.datadog.sample import com.juul.datadog.Configuration import com.juul.datadog.Site.US1 -public actual val configuration: Configuration = Configuration( - clientToken = DATADOG_CLIENT_TOKEN, - site = US1, - environment = "staging", - service = "com.juul.datadog.sample.webapp", - version = "0.0.1", -) +public actual val configuration: Configuration = + Configuration( + clientToken = DATADOG_CLIENT_TOKEN, + site = US1, + environment = "staging", + service = "com.juul.datadog.sample.webapp", + version = "0.0.1", + ) diff --git a/webapp/src/jsMain/kotlin/Webapp.kt b/webapp/src/jsMain/kotlin/Webapp.kt index 7e9b69e..d9b19d4 100644 --- a/webapp/src/jsMain/kotlin/Webapp.kt +++ b/webapp/src/jsMain/kotlin/Webapp.kt @@ -4,7 +4,6 @@ import com.juul.datadog.TrackingConsent.Granted @JsExport public class Webapp { - public fun init() { initializeDatadog(Granted) } @@ -13,7 +12,10 @@ public class Webapp { info(message) } - public fun e(message: String, exceptionMessage: String) { + public fun e( + message: String, + exceptionMessage: String, + ) { testException(message, exceptionMessage) } }