Skip to content

Commit

Permalink
Merge branch 'feature/rule-2.4-file-header-comments' into 'master'
Browse files Browse the repository at this point in the history
Fixed failing tests and compiler warnings

See merge request codestyle/huawei-ktlint!35
  • Loading branch information
orchestr7 committed Jun 17, 2020
2 parents b56d6f4 + c4989ec commit 5a42538
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class RulesConfigReader : JsonResourceConfigReader<List<RulesConfig>> {
* 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()
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 5a42538

Please sign in to comment.