All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.gitlab.arturbosch.detekt.api.internal.EmptyConfig.kt Maven / Gradle / Ivy

package io.gitlab.arturbosch.detekt.api.internal

import io.gitlab.arturbosch.detekt.api.Config

/**
 * NOP-implementation of a config object.
 */
internal object EmptyConfig : Config {

    override fun subConfig(key: String): EmptyConfig = this

    @Suppress("UNCHECKED_CAST")
    override fun  valueOrNull(key: String): T? = when (key) {
        Config.ACTIVE_KEY -> true as? T
        else -> null
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy