Interface JacocoViolationRule
- All Superinterfaces:
Serializable
Defines a Jacoco violation rule.
- Since:
- 3.4
-
Method Summary
Modifier and TypeMethodDescriptionGets the element for the rule as defined by org.jacoco.core.analysis.ICoverageNode.ElementType.List of elements that should be excluded from check.List of elements that should be included in check.Gets all limits defined for this rule.boolean
Indicates if the rule should be used when checking generated coverage metrics.limit
(Action<? super JacocoLimit> configureAction) Adds a limit for this rule.void
setElement
(String element) Sets element for the rule.void
setEnabled
(boolean enabled) void
setExcludes
(List<String> excludes) Sets list of elements that should be excluded from check.void
setIncludes
(List<String> includes) Sets list of elements that should be included in check.
-
Method Details
-
setEnabled
void setEnabled(boolean enabled) -
isEnabled
Indicates if the rule should be used when checking generated coverage metrics. Defaults to true. -
setElement
Sets element for the rule.- Parameters:
element
- Element
-
getElement
Gets the element for the rule as defined by org.jacoco.core.analysis.ICoverageNode.ElementType. Valid scope values are BUNDLE, PACKAGE, CLASS, SOURCEFILE and METHOD. Defaults to BUNDLE. -
setIncludes
Sets list of elements that should be included in check.- Parameters:
includes
- Inclusions
-
getIncludes
List of elements that should be included in check. Names can use wildcards (* and ?). If left empty, all elements will be included. Defaults to [*]. -
setExcludes
Sets list of elements that should be excluded from check.- Parameters:
excludes
- Exclusions
-
getExcludes
List of elements that should be excluded from check. Names can use wildcards (* and ?). If left empty, no elements will be excluded. Defaults to an empty list. -
getLimits
Gets all limits defined for this rule. Defaults to an empty list. -
limit
Adds a limit for this rule. Any number of limits can be added.
-