Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use plain ASCII output in standard reports #4968

Merged
merged 1 commit into from Jun 19, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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