detekt-api
1.21.0-RC2

# ConsoleReport

abstract class ConsoleReport : Extension
Content copied to clipboard

Extension point which describes how findings should be printed on the console.

Additional ConsoleReport's can be made available through the java.util.ServiceLoader pattern. If the default reporting mechanism should be turned off, exclude the entry 'FindingsReport' in the 'console-reports' property of a detekt yaml config.

## Constructors

ConsoleReport
Link copied to clipboard
fun ConsoleReport ()
Content copied to clipboard

## 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.

print
Link copied to clipboard
fun print (printer: PrintStream , detektion: Detektion )
Content copied to clipboard

Prints the rendered report to the given printer if anything was rendered at all.

render
Link copied to clipboard
abstract fun render (detektion: Detektion ): String ?
Content copied to clipboard

Converts the given detektion into a string representation to present it to the client. The implementation specifies which parts of the report are important to the user.

## 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.