mirror of
https://github.com/jlengrand/detekt.git
synced 2026-03-10 08:11:23 +00:00
Use plain ASCII output in standard reports (#4968)
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user