Skip to content

Commit

Permalink
Use plain ASCII output in standard reports (#4968)
Browse files Browse the repository at this point in the history
  • Loading branch information
3flex committed Jun 19, 2022
1 parent b06276a commit 06ee239
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Expand Up @@ -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"
Expand Down Expand Up @@ -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
}
}
Expand Down
@@ -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

0 comments on commit 06ee239

Please sign in to comment.