Skip to content

Commit 45299f2

Browse files
committed
detekt
1 parent b1924d2 commit 45299f2

File tree

4 files changed

+8
-4
lines changed

4 files changed

+8
-4
lines changed

gradle-plugin/src/main/kotlin/kotlinx/rpc/grpc/DefaultGrpcExtension.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,13 @@ internal open class DefaultGrpcExtension @Inject constructor(
7878
}
7979
}
8080

81-
@Suppress("detekt.LongMethod", "detekt.CyclomaticComplexMethod")
81+
@Suppress("detekt.LongMethod", "detekt.CyclomaticComplexMethod", "detekt.ThrowsCount")
8282
private fun Project.configureTasks(protoSourceSet: DefaultProtoSourceSet) {
8383
// todo remove after KRPC-180
8484
if (!protoSourceSet.languageSourceSets.isPresent) {
8585
logger.debug(
86-
"Language source sets are not set for proto source set '${protoSourceSet.name}', skipping buf tasks configuration"
86+
"Language source sets are not set for proto source set '${protoSourceSet.name}', " +
87+
"skipping buf tasks configuration"
8788
)
8889

8990
return

gradle-plugin/src/main/kotlin/kotlinx/rpc/proto/kotlinMultiplatformPluginJar.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ import org.gradle.api.provider.Provider
2121
* ```
2222
*/
2323
public val Project.kotlinMultiplatformProtocPluginJarPath: Provider<String>
24-
get() = project.configurations.named(PROTOC_GEN_KOTLIN_MULTIPLATFORM_JAR_CONFIGURATION).map { it.singleFile.absolutePath }
24+
get() = project.configurations.named(PROTOC_GEN_KOTLIN_MULTIPLATFORM_JAR_CONFIGURATION)
25+
.map { it.singleFile.absolutePath }
2526

2627
internal fun Project.configureKotlinMultiplatformPluginJarConfiguration() {
2728
configurations.create(PROTOC_GEN_KOTLIN_MULTIPLATFORM_JAR_CONFIGURATION)

gradle-plugin/src/test/kotlin/kotlinx/rpc/GrpcJvmProjectTest.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,7 @@ inputs:
173173
assert(result.output.contains("Artifact is not specified for protoc plugin myPlugin"))
174174
}
175175

176+
@Suppress("detekt.MaxLineLength")
176177
private val cliFlagsRegex = "- Buf Arguments: \\[.*?, generate, --output, .*?, --include-imports, --include-wkt, --error-format, json, --config, some\\.buf\\.yaml, --log-format, json, --timeout, 60s]".toRegex()
177178

178179
@Test

gradle-plugin/src/test/kotlin/kotlinx/rpc/base/GrpcBaseTest.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,8 @@ abstract class GrpcBaseTest : BaseTest() {
8181
}.toSet()
8282

8383
protoSources.walk().forEach {
84-
if (it.isRegularFile() && it.extension == "proto" && it.relativeTo(protoSources).pathString !in included) {
84+
val pathString = it.relativeTo(protoSources).pathString
85+
if (it.isRegularFile() && it.extension == "proto" && pathString !in included) {
8586
fail("File 'file://${it.absolutePathString()}' in '$protoSources' is not expected")
8687
}
8788
}

0 commit comments

Comments
 (0)