Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update plugin kotlinter to v4 #23

Merged
merged 5 commits into from
Nov 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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" }
11 changes: 6 additions & 5 deletions library/src/androidMain/kotlin/Configuration.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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",
)
5 changes: 4 additions & 1 deletion library/src/commonMain/kotlin/Logger.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
13 changes: 7 additions & 6 deletions library/src/iosMain/kotlin/Configuration.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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",
)
15 changes: 8 additions & 7 deletions library/src/jsMain/kotlin/Configuration.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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",
)
6 changes: 4 additions & 2 deletions webapp/src/jsMain/kotlin/Webapp.kt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import com.juul.datadog.TrackingConsent.Granted

@JsExport
public class Webapp {

public fun init() {
initializeDatadog(Granted)
}
Expand All @@ -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)
}
}