detekt-api
1.21.0-RC2

# ConfigValidator

interface ConfigValidator : Extension
Content copied to clipboard

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.

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

validate
Link copied to clipboard
abstract fun validate (config: Config ): Collection < Notification >
Content copied to clipboard

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

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