From fff7bc606fc30f02ebc6ad3f429035243383a754 Mon Sep 17 00:00:00 2001 From: Robert Jaros Date: Wed, 22 Aug 2018 15:31:20 +0200 Subject: Style warnings fixes. --- src/main/kotlin/pl/treksoft/kvision/KVManager.kt | 2 +- src/main/kotlin/pl/treksoft/kvision/form/Form.kt | 3 ++- src/main/kotlin/pl/treksoft/kvision/i18n/I18n.kt | 2 ++ 3 files changed, 5 insertions(+), 2 deletions(-) (limited to 'src/main/kotlin/pl/treksoft/kvision') diff --git a/src/main/kotlin/pl/treksoft/kvision/KVManager.kt b/src/main/kotlin/pl/treksoft/kvision/KVManager.kt index 40cc1053..80279020 100644 --- a/src/main/kotlin/pl/treksoft/kvision/KVManager.kt +++ b/src/main/kotlin/pl/treksoft/kvision/KVManager.kt @@ -47,7 +47,7 @@ external fun require(name: String): dynamic /** * Internal singleton object which initializes and configures KVision framework. */ -@Suppress("EmptyCatchBlock", "TooGenericExceptionCaught") +@Suppress("EmptyCatchBlock", "TooGenericExceptionCaught", "LargeClass") internal object KVManager { internal const val AJAX_REQUEST_DELAY = 300 internal const val KVNULL = "#kvnull" diff --git a/src/main/kotlin/pl/treksoft/kvision/form/Form.kt b/src/main/kotlin/pl/treksoft/kvision/form/Form.kt index 7d429c2e..62d22de9 100644 --- a/src/main/kotlin/pl/treksoft/kvision/form/Form.kt +++ b/src/main/kotlin/pl/treksoft/kvision/form/Form.kt @@ -54,7 +54,8 @@ private class FormMapWrapper(private val map: Map) : Map { return Promise { resolve, _ -> val xmlHttpRequest = XMLHttpRequest() @@ -137,6 +138,7 @@ object I18n { gettext(text.substring(I18N_SINGLE_DELIMITER.length)) } else if (text.startsWith(I18N_PLURAL_DELIMITER)) { val tab = text.substring(I18N_PLURAL_DELIMITER.length).split(I18N_PLURAL_DELIMITER) + @Suppress("MagicNumber") if (tab.size == 3) { ngettext(tab[0], tab[1], tab[2].toIntOrNull() ?: 1) } else { -- cgit