All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.gitlab.arturbosch.detekt.cli.console.ComplexityReport.kt Maven / Gradle / Ivy

There is a newer version: 1.23.7
Show newest version
package io.gitlab.arturbosch.detekt.cli.console

import io.gitlab.arturbosch.detekt.api.ConsoleReport
import io.gitlab.arturbosch.detekt.api.Detektion

class ComplexityReport : ConsoleReport() {

    override val priority: Int = 20

    override fun render(detektion: Detektion): String? {
        val complexityReportGenerator = ComplexityReportGenerator.create(detektion)
        return complexityReportGenerator.generate()?.let { list ->
            with(StringBuilder()) {
                append("Complexity Report:\n")
                list.forEach {
                    append(PREFIX)
                    append(it)
                    append("\n")
                }
                toString()
            }
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy