detekt-api
1.21.0-RC2

# ReportingExtension

interface ReportingExtension : Extension
Content copied to clipboard

Allows to intercept detekt's result container by listening to the initial and final state and manipulate the reported findings.

## Functions

init
Link copied to clipboard
open fun init (config: Config )
Content copied to clipboard

Allows to read any or even user defined properties from the detekt yaml config to setup this extension.

open fun init (context: SetupContext )
Content copied to clipboard

Setup extension by querying common paths and config options.

onFinalResult
Link copied to clipboard
open fun onFinalResult (result: Detektion )
Content copied to clipboard

Is called after all extensions's transformFindings were called.

onRawResult
Link copied to clipboard
open fun onRawResult (result: Detektion )
Content copied to clipboard

Is called before any transformFindings calls were executed.

transformFindings
Link copied to clipboard
open fun transformFindings (findings: Map < RuleSetId , List < Finding >>): Map < RuleSetId , List < Finding >>
Content copied to clipboard

Allows to transform the reported findings e.g. apply custom filtering.

## Properties

id
Link copied to clipboard
open val id : String
Content copied to clipboard

Name of the extension.

priority
Link copied to clipboard
open val priority : Int
Content copied to clipboard

Is used to run extensions in a specific order. The higher the priority the sooner the extension will run in detekt's lifecycle.