ConfigValidator

An extension which allows users to validate parts of the configuration.

Rule authors can validate if specific properties do appear in their config or if their value lies in a specified range.

Properties

Link copied to clipboard
abstract 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.

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
abstract fun validate(config: Config): Collection<Notification>

Executes queries on given config and reports any warnings or errors via Notifications.