Skip to content

Commit 9644dd9

Browse files
author
Ronald Holshausen
committedMar 22, 2020
chore: upgrade Kotlinter to 2.3.2
1 parent 7027da8 commit 9644dd9

File tree

6 files changed

+19
-10
lines changed

6 files changed

+19
-10
lines changed
 

‎.editorconfig

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[*.kt]
2+
disabled_rules=import-ordering

‎build.gradle

+1-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ buildscript {
1111

1212
plugins {
1313
id 'nebula.kotlin' version '1.3.70'
14-
id 'org.jmailen.kotlinter' version '1.26.0'
14+
id 'org.jmailen.kotlinter' version '2.3.2'
1515
id 'io.gitlab.arturbosch.detekt' version '1.0.0-RC14'
1616
id 'org.jetbrains.dokka' version '0.10.0'
1717
id 'com.github.johnrengelman.shadow' version '5.0.0' apply false
@@ -209,7 +209,6 @@ subprojects {
209209

210210
kotlinter {
211211
indentSize = 2
212-
continuationIndentSize = 2
213212
reporters = ['checkstyle', 'plain', 'json']
214213
}
215214

‎core/model/src/main/kotlin/au/com/dius/pact/core/model/PactReader.kt

+7-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,13 @@ import au.com.dius.pact.core.support.Json
1313
import com.amazonaws.services.s3.AmazonS3
1414
import com.amazonaws.services.s3.AmazonS3ClientBuilder
1515
import com.amazonaws.services.s3.AmazonS3URI
16-
import com.github.salomonbrys.kotson.*
16+
import com.github.salomonbrys.kotson.array
17+
import com.github.salomonbrys.kotson.get
18+
import com.github.salomonbrys.kotson.jsonArray
19+
import com.github.salomonbrys.kotson.jsonObject
20+
import com.github.salomonbrys.kotson.obj
21+
import com.github.salomonbrys.kotson.set
22+
import com.github.salomonbrys.kotson.string
1723
import com.github.zafarkhaja.semver.Version
1824
import com.google.gson.JsonElement
1925
import com.google.gson.JsonObject

‎provider/pact-jvm-provider-junit/src/main/kotlin/au/com/dius/pact/provider/junit/InteractionRunner.kt

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
package au.com.dius.pact.provider.junit
22

3-
import au.com.dius.pact.core.model.*
3+
import au.com.dius.pact.core.model.FilteredPact
4+
import au.com.dius.pact.core.model.Interaction
5+
import au.com.dius.pact.core.model.Pact
6+
import au.com.dius.pact.core.model.PactSource
7+
import au.com.dius.pact.core.model.ProviderState
48
import au.com.dius.pact.core.pactbroker.TestResult
59
import au.com.dius.pact.provider.DefaultTestResultAccumulator
610
import au.com.dius.pact.provider.IProviderVerifier

‎provider/pact-jvm-provider-junit/src/main/kotlin/au/com/dius/pact/provider/junit/descriptions/DescriptionGenerator.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,4 @@ class DescriptionGenerator<I : Interaction>(
3535
}
3636
return ""
3737
}
38-
}
38+
}

‎provider/pact-jvm-provider/src/main/kotlin/au/com/dius/pact/provider/ProviderClient.kt

+3-5
Original file line numberDiff line numberDiff line change
@@ -342,11 +342,9 @@ open class ProviderClient(
342342
}
343343

344344
if (provider.stateChangeRequestFilter != null) {
345-
when {
346-
provider.stateChangeRequestFilter is Closure<*> ->
347-
(provider.stateChangeRequestFilter as Closure<*>).call(method)
348-
provider.stateChangeRequestFilter is Function1<*, *> ->
349-
(provider.stateChangeRequestFilter as Function1<Any, Any>).apply(method)
345+
when (provider.stateChangeRequestFilter) {
346+
is Closure<*> -> (provider.stateChangeRequestFilter as Closure<*>).call(method)
347+
is Function1<*, *> -> (provider.stateChangeRequestFilter as Function1<Any, Any>).apply(method)
350348
else -> {
351349
val binding = Binding()
352350
binding.setVariable(REQUEST, method)

0 commit comments

Comments
 (0)
Please sign in to comment.