Skip to content

Commit 3597904

Browse files
committed
Resolve linter errors
Signed-off-by: Bence Hornák <[email protected]>
1 parent 7744777 commit 3597904

File tree

10 files changed

+38
-13
lines changed

10 files changed

+38
-13
lines changed

.editorconfig

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@ ij_kotlin_method_call_chain_wrap = normal
6868
ij_kotlin_method_parameters_new_line_after_left_paren = true
6969
ij_kotlin_method_parameters_right_paren_on_new_line = true
7070
ij_kotlin_method_parameters_wrap = on_every_item
71-
ij_kotlin_name_count_to_use_star_import = 5
72-
ij_kotlin_name_count_to_use_star_import_for_members = 3
71+
ij_kotlin_name_count_to_use_star_import = 999
72+
ij_kotlin_name_count_to_use_star_import_for_members = 999
7373
ij_kotlin_packages_to_use_import_on_demand = unset
7474
ij_kotlin_parameter_annotation_wrap = off
7575
ij_kotlin_space_after_comma = true
@@ -130,4 +130,7 @@ max_line_length=120
130130

131131
# Ignore max line for kotlin test files, the same as Detekt.
132132
[**/{test,androidTest}/**/*.kt]
133-
max_line_length=off
133+
max_line_length=off
134+
135+
[*.kts]
136+
max_line_length = off

kotlin-sdk/build.gradle.kts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
2-
3-
// ktlint-disable max-line-length
42
plugins {
53
id("com.android.library")
64
id("org.jetbrains.kotlin.multiplatform")

kotlin-sdk/src/commonMain/kotlin/dev/openfeature/sdk/OpenFeatureAPI.kt

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,23 @@ package dev.openfeature.sdk
22

33
import dev.openfeature.sdk.events.OpenFeatureProviderEvents
44
import dev.openfeature.sdk.exceptions.OpenFeatureError
5-
import kotlinx.coroutines.*
5+
import kotlinx.coroutines.CancellationException
6+
import kotlinx.coroutines.CoroutineDispatcher
7+
import kotlinx.coroutines.CoroutineScope
8+
import kotlinx.coroutines.Dispatchers
9+
import kotlinx.coroutines.ExperimentalCoroutinesApi
10+
import kotlinx.coroutines.Job
11+
import kotlinx.coroutines.SupervisorJob
12+
import kotlinx.coroutines.cancel
13+
import kotlinx.coroutines.cancelChildren
614
import kotlinx.coroutines.flow.Flow
715
import kotlinx.coroutines.flow.FlowCollector
816
import kotlinx.coroutines.flow.MutableSharedFlow
917
import kotlinx.coroutines.flow.MutableStateFlow
1018
import kotlinx.coroutines.flow.distinctUntilChanged
1119
import kotlinx.coroutines.flow.filterIsInstance
1220
import kotlinx.coroutines.flow.flatMapLatest
21+
import kotlinx.coroutines.launch
1322

1423
@Suppress("TooManyFunctions")
1524
object OpenFeatureAPI {

kotlin-sdk/src/commonTest/kotlin/dev/openfeature/sdk/DeveloperExperienceTests.kt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,12 @@ import kotlinx.coroutines.launch
1818
import kotlinx.coroutines.test.StandardTestDispatcher
1919
import kotlinx.coroutines.test.advanceUntilIdle
2020
import kotlinx.coroutines.test.runTest
21-
import kotlin.test.*
21+
import kotlin.test.AfterTest
22+
import kotlin.test.Test
23+
import kotlin.test.assertEquals
24+
import kotlin.test.assertFalse
25+
import kotlin.test.assertNull
26+
import kotlin.test.assertTrue
2227

2328
@OptIn(ExperimentalCoroutinesApi::class)
2429
class DeveloperExperienceTests {

kotlin-sdk/src/commonTest/kotlin/dev/openfeature/sdk/EvaluationMetadataTest.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import kotlin.test.Test
44
import kotlin.test.assertEquals
55
import kotlin.test.assertNull
66

7-
87
class EvaluationMetadataTest {
98

109
private val metadata = EvaluationMetadata.builder()

kotlin-sdk/src/commonTest/kotlin/dev/openfeature/sdk/ProviderSpecTests.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import kotlin.test.assertEquals
55
import kotlin.test.assertNotNull
66
import kotlin.test.assertNull
77

8-
98
class ProviderSpecTests {
109

1110
@Test

kotlin-sdk/src/commonTest/kotlin/dev/openfeature/sdk/StatusTests.kt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,11 @@ import kotlinx.coroutines.test.TestScope
1212
import kotlinx.coroutines.test.advanceUntilIdle
1313
import kotlinx.coroutines.test.runTest
1414
import kotlin.random.Random
15-
import kotlin.test.*
15+
import kotlin.test.BeforeTest
16+
import kotlin.test.Test
17+
import kotlin.test.assertEquals
18+
import kotlin.test.assertFalse
19+
import kotlin.test.assertTrue
1620
import kotlin.time.Duration
1721

1822
class StatusTests {

kotlin-sdk/src/commonTest/kotlin/dev/openfeature/sdk/TelemetryTest.kt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,10 @@ class TelemetryTest {
118118
)
119119
val evaluationEvent = createEvaluationEvent(hookContext, flagEvaluationDetails)
120120

121-
assertEquals(EvaluationReason.TARGETING_MATCH.name.lowercase(), evaluationEvent.attributes[TELEMETRY_REASON])
121+
assertEquals(
122+
EvaluationReason.TARGETING_MATCH.name.lowercase(),
123+
evaluationEvent.attributes[TELEMETRY_REASON]
124+
)
122125
}
123126
}
124127

kotlin-sdk/src/commonTest/kotlin/dev/openfeature/sdk/TrackingProviderTests.kt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
package dev.openfeature.sdk
22

33
import kotlinx.coroutines.test.runTest
4-
import kotlin.test.*
4+
import kotlin.test.AfterTest
5+
import kotlin.test.BeforeTest
6+
import kotlin.test.Test
7+
import kotlin.test.assertEquals
8+
import kotlin.test.assertFailsWith
9+
import kotlin.test.assertNotNull
10+
import kotlin.test.assertNull
511

612
class TrackingProviderTests {
713

kotlin-sdk/src/commonTest/kotlin/dev/openfeature/sdk/ValueTests.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import kotlin.test.Test
44
import kotlin.test.assertEquals
55
import kotlin.test.assertTrue
66

7-
87
class ValueTests {
98

109
@Test

0 commit comments

Comments
 (0)