From c78775aa2aaf76f9fa1404ff32a10fb8227f380e Mon Sep 17 00:00:00 2001 From: Robert Jaros Date: Fri, 25 Oct 2019 20:46:42 +0200 Subject: Style fixes --- .../main/kotlin/pl/treksoft/kvision/plugin/KVProcessor.kt | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'kvision-tools/kvision-compiler-plugin/src/main/kotlin/pl/treksoft') diff --git a/kvision-tools/kvision-compiler-plugin/src/main/kotlin/pl/treksoft/kvision/plugin/KVProcessor.kt b/kvision-tools/kvision-compiler-plugin/src/main/kotlin/pl/treksoft/kvision/plugin/KVProcessor.kt index bf01b463..eba66a9b 100644 --- a/kvision-tools/kvision-compiler-plugin/src/main/kotlin/pl/treksoft/kvision/plugin/KVProcessor.kt +++ b/kvision-tools/kvision-compiler-plugin/src/main/kotlin/pl/treksoft/kvision/plugin/KVProcessor.kt @@ -53,6 +53,7 @@ class KVProcessor : AbstractProcessor() { } } + @Suppress("MaxLineLength", "ComplexMethod", "NestedBlockDepth") override fun process(roundEnvironment: RoundEnvironment) { val isCommon = this.configuration.kotlinSourceRoots.find { !it.isCommon } == null if (isCommon) { @@ -85,8 +86,10 @@ class KVProcessor : AbstractProcessor() { appendln(" GlobalScope.launch(start = CoroutineStart.UNDISPATCHED) {") cl.methods().forEach { when { - it.returnType.toString().startsWith("RemoteData") -> appendln(" bindTabulatorRemote($iName::${it.name})") - it.returnType.toString() == "List" -> appendln(" bindSelectRemote($iName::${it.name})") + it.returnType.toString().startsWith("RemoteData") -> + appendln(" bindTabulatorRemote($iName::${it.name})") + it.returnType.toString() == "List" -> + appendln(" bindSelectRemote($iName::${it.name})") else -> appendln(" bind($iName::${it.name})") } } @@ -180,15 +183,15 @@ class KVProcessor : AbstractProcessor() { } private fun getParameterList(params: List): String { - return params.map { + return params.joinToString(", ") { "${it.name.asString()}: ${it.type}" - }.joinToString(", ") + } } private fun getParameterNames(params: List): String { - return params.map { + return params.joinToString(", ") { it.name.asString() - }.joinToString(", ") + } } private fun getTypes(type: KotlinType): Set { -- cgit