Class SecondLevelProblemGroup

java.lang.Object
org.gradle.api.problems.ProblemGroup
org.gradle.api.problems.SecondLevelProblemGroup

@Incubating public abstract class SecondLevelProblemGroup extends ProblemGroup
A problem group directly below a RootProblemGroup, either predefined (for example Compilation > Java) or created through RootProblemGroup.group(String).

Problems can be reported into this group with problemId(String). A third level of sub-groups can be created with group(String); see ThirdLevelProblemGroup.

Not intended for subclassing outside of Gradle. New members may be added in future versions.

Since:
9.9.0
See Also:
  • Constructor Details

    • SecondLevelProblemGroup

      protected SecondLevelProblemGroup()
      Constructor.
      Since:
      9.9.0
  • Method Details

    • group

      public abstract ThirdLevelProblemGroup group(String name)
      Returns the third-level sub-group with the given name. Third-level groups cannot have sub-groups of their own.

      Names are case-sensitive. The name Undefined is reserved in any letter case; use getUndefined() instead. Group names should be short and noun-based, so they read well as categories in a report. They consist of letters and digits of any script, single spaces between words, and the characters - _ . + / & ' #, start with a letter or a digit, must be in Unicode normalization form NFC, and are limited to 50 characters.

      Parameters:
      name - the name of the sub-group
      Returns:
      the sub-group
      Throws:
      IllegalArgumentException - if the name is invalid or reserved
      Since:
      9.9.0
    • problemId

      public abstract ProblemId problemId(String name)
      Creates a problem id in this group.

      Problem names should be a single, concise sentence describing the kind of problem, without contextual details such as file names or values; those belong in the contextual label, the details, and the locations of the reported problem. They must not be blank, must not have leading or trailing whitespace, must not contain control or format characters (other than the zero width joiner and non-joiner), and are limited to 2000 characters.

      Parameters:
      name - the name of the problem
      Returns:
      the problem id
      Throws:
      IllegalArgumentException - if the name is invalid
      Since:
      9.9.0
    • getUndefined

      public abstract UndefinedProblemGroup getUndefined()
      The synthetic Undefined sub-group for problems without an explicitly defined sub-group below this group.

      Prefer reporting into this group directly with problemId(String), or into a sub-group created with group(String). This group exists so that a problem can be reported without inventing a category.

      Since:
      9.9.0