ConsoleReport

abstract class ConsoleReport : Extension

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

Link copied to clipboard
fun ConsoleReport()

Functions

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

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

open fun init(context: SetupContext)

Setup extension by querying common paths and config options.

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

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

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

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

Link copied to clipboard
open val id: String

Name of the extension.

Link copied to clipboard
open val priority: Int

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