Fixed handling of special symbols in paths when reporting errors
#KT-53246 Fixed
This commit is contained in:
+4
-1
@@ -5,6 +5,8 @@
|
|||||||
|
|
||||||
package org.jetbrains.kotlin.cli.common.messages
|
package org.jetbrains.kotlin.cli.common.messages
|
||||||
|
|
||||||
|
import java.io.File
|
||||||
|
|
||||||
class GradleStyleMessageRenderer : MessageRenderer {
|
class GradleStyleMessageRenderer : MessageRenderer {
|
||||||
|
|
||||||
override fun render(severity: CompilerMessageSeverity, message: String, location: CompilerMessageSourceLocation?): String {
|
override fun render(severity: CompilerMessageSeverity, message: String, location: CompilerMessageSourceLocation?): String {
|
||||||
@@ -19,7 +21,8 @@ class GradleStyleMessageRenderer : MessageRenderer {
|
|||||||
append("$prefix: ")
|
append("$prefix: ")
|
||||||
|
|
||||||
location?.apply {
|
location?.apply {
|
||||||
append("file://$path")
|
val fileUri = File(path).toPath().toUri()
|
||||||
|
append("$fileUri")
|
||||||
if (line > 0 && column > 0) {
|
if (line > 0 && column > 0) {
|
||||||
append(":$line:$column ")
|
append(":$line:$column ")
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user