io.gitlab.arturbosch.detekt.api.ThresholdRule.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of detekt-api Show documentation
Show all versions of detekt-api Show documentation
Static code analysis for Kotlin
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