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

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

package io.gitlab.arturbosch.detekt.cli.console

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

class NotificationReport : ConsoleReport() {

    // Print notifications before the build failure report but after all other reports.
    // This allows to compute intermediate messages based on detekt results and do not rely on 'println'.
    override val priority: Int = Int.MIN_VALUE + 1

    override fun render(detektion: Detektion): String? {
        if (detektion.notifications.isEmpty()) {
            return null
        }
        return detektion.notifications.joinToString(System.lineSeparator()) { it.message }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy