api / org.gradle.testing.jacoco.tasks.rules / JacocoLimit

JacocoLimit

@Incubating interface JacocoLimit : Serializable

Defines a Jacoco rule limit.

Since
3.4

Functions

getCounter

abstract fun getCounter(): String

The counter that applies to the limit as defined by org.jacoco.core.analysis.ICoverageNode.CounterEntity. Valid values are INSTRUCTION, LINE, BRANCH, COMPLEXITY, METHOD and CLASS. Defaults to INSTRUCTION.

getMaximum

abstract fun getMaximum(): BigDecimal

Gets the maximum expected value for limit. Default to null.

getMinimum

abstract fun getMinimum(): BigDecimal

Gets the minimum expected value for limit. Default to null.

getValue

abstract fun getValue(): String

The value that applies to the limit as defined by org.jacoco.core.analysis.ICounter.CounterValue. Valid values are TOTALCOUNT, MISSEDCOUNT, COVEREDCOUNT, MISSEDRATIO and COVEREDRATIO. Defaults to COVEREDRATIO.

setCounter

abstract fun setCounter(counter: String): Unit

Sets the counter that applies to the limit.

setMaximum

abstract fun setMaximum(maximum: BigDecimal): Unit

Sets the maximum expected value for limit.

setMinimum

abstract fun setMinimum(minimum: BigDecimal): Unit

Sets the minimum expected value for limit.

setValue

abstract fun setValue(value: String): Unit

Sets the value that applies to the limit.