Use plain ASCII output in standard reports (#4968)

This commit is contained in:
Matthew Haughton
2022-06-19 10:07:41 +10:00
committed by GitHub
parent b06276af54
commit 06ee239441
2 changed files with 2 additions and 3 deletions

View File

@@ -12,7 +12,6 @@ import io.gitlab.arturbosch.detekt.api.Detektion
import io.gitlab.arturbosch.detekt.api.Finding
import io.gitlab.arturbosch.detekt.api.RuleSetId
import io.gitlab.arturbosch.detekt.api.ThresholdedCodeSmell
import kotlin.text.Typography.ellipsis
internal fun defaultReportMapping(reportId: String) = when (reportId) {
TxtOutputReport::class.java.simpleName -> "txt"
@@ -81,7 +80,7 @@ private fun Finding.truncatedMessage(): String {
.replace(messageReplacementRegex, " ")
.trim()
return when {
message.length > REPORT_MESSAGE_SIZE_LIMIT -> "${message.take(REPORT_MESSAGE_SIZE_LIMIT)}($ellipsis)"
message.length > REPORT_MESSAGE_SIZE_LIMIT -> "${message.take(REPORT_MESSAGE_SIZE_LIMIT)}(...)"
else -> message
}
}

View File

@@ -1,5 +1,5 @@
Ruleset - 10min debt
LongRule - [This is just a long message that should be truncated after a given threshold is ()] at File.kt:1:1
LongRule - [This is just a long message that should be truncated after a given threshold is (...)] at File.kt:1:1
MultilineRule - [A multiline message.] at File.kt:1:1
Overall debt: 10min