Skip to content

Commit

Permalink
Fixed failing tests and compiler warnings
Browse files Browse the repository at this point in the history
### What's done:
* Fixed failing tests
* Fixed compiler warnings
  • Loading branch information
petertrr committed Jun 17, 2020
1 parent 67fe432 commit c4989ec
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 c4989ec

Please sign in to comment.