Skip to content

Commit

Permalink
Fix indentation issues
Browse files Browse the repository at this point in the history
  • Loading branch information
joshafeinberg committed Jun 21, 2020
1 parent f5bea8d commit fd8f5e8
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,14 @@ private fun parseBaselineErrorsByFile(element: Element): MutableList<LintError>
val errorsList = element.getElementsByTagName("error")
for (i in 0 until errorsList.length) {
val errorElement = errorsList.item(i) as Element
errors.add(LintError(
line = errorElement.getAttribute("line").toInt(),
col = errorElement.getAttribute("column").toInt(),
ruleId = errorElement.getAttribute("source"),
detail = "" // we don't have details in the baseline file
))
errors.add(
LintError(
line = errorElement.getAttribute("line").toInt(),
col = errorElement.getAttribute("column").toInt(),
ruleId = errorElement.getAttribute("source"),
detail = "" // we don't have details in the baseline file
)
)
}
return errors
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,14 @@ class BaselineUtilsKtTest {
detail = ""
)

val baseline: InputStream = ByteArrayInputStream("""
<file name="$filename">
<error line="${errorOne.line}" column="${errorOne.col}" source="${errorOne.ruleId}" />
<error line="${errorTwo.line}" column="${errorTwo.col}" source="${errorTwo.ruleId}" />
</file>
""".toByteArray())
val baseline: InputStream = ByteArrayInputStream(
"""
<file name="$filename">
<error line="${errorOne.line}" column="${errorOne.col}" source="${errorOne.ruleId}" />
<error line="${errorTwo.line}" column="${errorTwo.col}" source="${errorTwo.ruleId}" />
</file>
""".toByteArray()
)

val baselineFiles = parseBaseline(baseline)

Expand Down

0 comments on commit fd8f5e8

Please sign in to comment.