detekt-api
1.21.0-RC2

# valuesWithReason

fun valuesWithReason (vararg values: Pair < String , String ?>): ValuesWithReason
Content copied to clipboard

This factory method can be used by rule authors to specify one or many configuration values along with an explanation for each value. For example:

    @Configuration("imports which should not be used")
    private val imports: ValuesWithReason by config(
        valuesWithReason("org.junit.Test" to "Do not use Junit4. Use org.junit.jupiter.api.Test instead.")
    )

Content copied to clipboard

Note that the config property delegate only supports the factory methods when defining ValuesWithReason.

fun valuesWithReason (values: List < ValueWithReason >): ValuesWithReason
Content copied to clipboard

This factory method can be used by rule authors to specify one or many configuration values along with an explanation for each value.

Note that the config property delegate only supports the factory methods when defining ValuesWithReason.