gradle
8.4

# JacocoViolationRule

interface JacocoViolationRule : Serializable(source)

Defines a Jacoco violation rule.

## Functions

getElement
Link copied to clipboard
@Input
abstract fun getElement(): String
Gets the element for the rule as defined by org.jacoco.core.analysis.ICoverageNode.ElementType.
getExcludes
Link copied to clipboard
@Input
abstract fun getExcludes(): List<String>
List of elements that should be excluded from check.
getIncludes
Link copied to clipboard
@Input
abstract fun getIncludes(): List<String>
List of elements that should be included in check.
getLimits
Link copied to clipboard
@Input
abstract fun getLimits(): List<JacocoLimit>
Gets all limits defined for this rule.
isEnabled
Link copied to clipboard
@Input
abstract fun isEnabled(): Boolean
Indicates if the rule should be used when checking generated coverage metrics.
limit
Link copied to clipboard
abstract fun limit(configureAction: Action<out Any>): JacocoLimit
Adds a limit for this rule.
setElement
Link copied to clipboard
abstract fun setElement(element: String)
Sets element for the rule.
setEnabled
Link copied to clipboard
abstract fun setEnabled(enabled: Boolean)
setExcludes
Link copied to clipboard
abstract fun setExcludes(excludes: List<String>)
Sets list of elements that should be excluded from check.
setIncludes
Link copied to clipboard
abstract fun setIncludes(includes: List<String>)
Sets list of elements that should be included in check.