From 8131f10d437df865adddcbb4a62f3f07ef80d9b1 Mon Sep 17 00:00:00 2001 From: Matthew Haughton <3flex@users.noreply.github.com> Date: Sat, 18 Jun 2022 23:01:18 +1000 Subject: [PATCH] Use plain ASCII output in standard reports --- .../io/gitlab/arturbosch/detekt/core/reporting/Reporting.kt | 3 +-- .../src/test/resources/reporting/long-messages-report.txt | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/detekt-core/src/main/kotlin/io/gitlab/arturbosch/detekt/core/reporting/Reporting.kt b/detekt-core/src/main/kotlin/io/gitlab/arturbosch/detekt/core/reporting/Reporting.kt index 9be5d9d9cc0..20ee87e95c6 100644 --- a/detekt-core/src/main/kotlin/io/gitlab/arturbosch/detekt/core/reporting/Reporting.kt +++ b/detekt-core/src/main/kotlin/io/gitlab/arturbosch/detekt/core/reporting/Reporting.kt @@ -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 } } diff --git a/detekt-core/src/test/resources/reporting/long-messages-report.txt b/detekt-core/src/test/resources/reporting/long-messages-report.txt index 23ab8780f8b..f5141676caf 100644 --- a/detekt-core/src/test/resources/reporting/long-messages-report.txt +++ b/detekt-core/src/test/resources/reporting/long-messages-report.txt @@ -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