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

io.gitlab.arturbosch.detekt.api.ThresholdRule.kt Maven / Gradle / Ivy

The newest version!
package io.gitlab.arturbosch.detekt.api

/**
 * Provides a threshold attribute for this rule, which is specified manually for default values
 * but can be also obtained from within a configuration object.
 */
@Deprecated("Extend the Rule class directly and use the config property delegate instead.")
abstract class ThresholdRule(config: Config, private val defaultThreshold: Int) : Rule(config) {
    /**
     * The used threshold for this rule is loaded from the configuration or used from the constructor value.
     */
    protected val threshold: Int get() = valueOrDefault("threshold", defaultThreshold)
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy