diff --git a/diktat-common/src/main/kotlin/config/rules/RulesConfigReader.kt b/diktat-common/src/main/kotlin/config/rules/RulesConfigReader.kt index c9dd076270..6c32189f39 100644 --- a/diktat-common/src/main/kotlin/config/rules/RulesConfigReader.kt +++ b/diktat-common/src/main/kotlin/config/rules/RulesConfigReader.kt @@ -41,7 +41,7 @@ class RulesConfigReader : JsonResourceConfigReader> { * if the path is provided, else will read the hardcoded file 'rules-config.json' from the package */ override fun getConfigFile(resourceFileName: String): URL? { - return File(resourceFileName).toURL() + return File(resourceFileName).toURI().toURL() } } diff --git a/diktat-huawei-rules/src/test/kotlin/com/huawei/rri/fixbot/ruleset/huawei/chapter2/KdocSignatureTest.kt b/diktat-huawei-rules/src/test/kotlin/com/huawei/rri/fixbot/ruleset/huawei/chapter2/KdocSignatureTest.kt index b02ef15bad..d84f9bfbc7 100644 --- a/diktat-huawei-rules/src/test/kotlin/com/huawei/rri/fixbot/ruleset/huawei/chapter2/KdocSignatureTest.kt +++ b/diktat-huawei-rules/src/test/kotlin/com/huawei/rri/fixbot/ruleset/huawei/chapter2/KdocSignatureTest.kt @@ -1,6 +1,8 @@ package com.huawei.rri.fixbot.ruleset.huawei.chapter2 import com.huawei.rri.fixbot.ruleset.huawei.constants.Warnings +import com.huawei.rri.fixbot.ruleset.huawei.constants.Warnings.KDOC_WITHOUT_RETURN_TAG +import com.huawei.rri.fixbot.ruleset.huawei.constants.Warnings.KDOC_WITHOUT_THROWS_TAG import com.huawei.rri.fixbot.ruleset.huawei.rules.KdocMethods import com.pinterest.ktlint.core.KtLint import com.pinterest.ktlint.core.LintError @@ -111,7 +113,7 @@ class KdocSignatureTest { """.trimIndent() lintMethod(invalidCode, LintError(1, 13, "kdoc-methods", - Warnings.KDOC_WITHOUT_RETURN_TAG.warnText())) + "${KDOC_WITHOUT_RETURN_TAG.warnText()} ")) } @Test @@ -129,7 +131,7 @@ class KdocSignatureTest { """.trimIndent() lintMethod(invalidCode, LintError(1, 13, "kdoc-methods", - Warnings.KDOC_WITHOUT_THROWS_TAG.warnText())) + "${KDOC_WITHOUT_THROWS_TAG.warnText()} ")) } @Test