io.gitlab.arturbosch.detekt.cli.console.ProjectStatisticsReport.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of detekt-cli Show documentation
Show all versions of detekt-cli Show documentation
Static code analysis for Kotlin
package io.gitlab.arturbosch.detekt.cli.console
import io.gitlab.arturbosch.detekt.api.ConsoleReport
import io.gitlab.arturbosch.detekt.api.Detektion
class ProjectStatisticsReport : ConsoleReport() {
override val priority: Int = 10
override fun render(detektion: Detektion): String? {
val metrics = detektion.metrics
if (metrics.isEmpty()) return null
return with(StringBuilder()) {
append("Project Statistics:".format())
metrics.sortedBy { it.priority }
.reversed()
.forEach { append(it.toString().format(PREFIX)) }
toString()
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy