fix android lint bug with no file column errors
This commit is contained in:
parent
3d73b2473f
commit
21e21aca1d
|
|
@ -2,11 +2,11 @@ package static_analysis.errors
|
|||
|
||||
class AndroidLintError(
|
||||
private val filePath: String,
|
||||
private val fileLine: String,
|
||||
private val fileLine: String?,
|
||||
private val errorId: String,
|
||||
private val description: String
|
||||
) : StaticAnalysisError {
|
||||
|
||||
override fun print(count: Int): String = "\n$count. Android Lint. $description ($errorId)\n\tat [$filePath:$fileLine]"
|
||||
override fun print(count: Int): String = "\n$count. Android Lint. $description ($errorId)\n\tat [$filePath${fileLine?.let { ":$it" }.orEmpty()}]"
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ class AndroidLinter : Linter {
|
|||
.map { locationNode ->
|
||||
AndroidLintError(
|
||||
filePath = locationNode.attribute("file") as String,
|
||||
fileLine = locationNode.attribute("line") as String,
|
||||
fileLine = locationNode.attribute("line") as String?,
|
||||
errorId = errorNode.attribute("id") as String,
|
||||
description = errorNode.attribute("message") as String
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in New Issue