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

io.gitlab.arturbosch.detekt.api.ReportingExtension.kt Maven / Gradle / Ivy

package io.gitlab.arturbosch.detekt.api

/**
 * Allows to intercept detekt's result container by listening to the initial and final state
 * and manipulate the reported findings.
 */
@UnstableApi
interface ReportingExtension : Extension {

    /**
     * Is called before any [transformFindings] calls were executed.
     */
    fun onRawResult(result: Detektion) {
        // intercept for the initial results
    }

    /**
     * Allows to transform the reported findings e.g. apply custom filtering.
     */
    fun transformFindings(findings: Map>): Map> = findings

    /**
     * Is called after all extensions's [transformFindings] were called.
     */
    fun onFinalResult(result: Detektion) {
        // intercept for the final results
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy