JacocoViolationRulesContainer (Gradle API 8.11.1)

Package org.gradle.testing.jacoco.tasks.rules

## Interface JacocoViolationRulesContainer

-     public interface JacocoViolationRulesContainer

  The violation rules configuration for the `JacocoReport` task.
  Since:
    3.4

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `java.util.List<JacocoViolationRule>` | `getRules()` | Gets all violation rules.
    `boolean` | `isFailOnViolation()` | Specifies whether build should fail in case of rule violations.
    `JacocoViolationRule` | `rule​(Action<? super JacocoViolationRule> configureAction)` | Adds a violation rule.
    `void` | `setFailOnViolation​(boolean ignore)` | Indicates whether build should fail in case of rule violation.

- - ### Method Detail

    - #### setFailOnViolation

          void setFailOnViolation​(boolean ignore)

      Indicates whether build should fail in case of rule violation.
      Parameters:
        `ignore` - Only render violation but do not fail build

    - #### isFailOnViolation

          @Input
          boolean isFailOnViolation()

      Specifies whether build should fail in case of rule violations. Defaults to true.

    - #### getRules

          @Input
          java.util.List<JacocoViolationRule> getRules()

      Gets all violation rules. Defaults to an empty list.

    - #### rule

          JacocoViolationRule rule​(Action<? super JacocoViolationRule> configureAction)

      Adds a violation rule. Any number of rules can be added.