Interface ProblemId


@Incubating public interface ProblemId
Represents a unique identifier for a problem definition.

Problem IDs are defined with a name and with group hierarchy. For example, in the domain of Java compilation problems, the id object for unused variable warnings would be:

ProblemId(name: Unused variable, group:
    ProblemGroup(name: Java, parent:
        ProblemGroup(name: Compilation, parent: null)))
Consumers of problem reports can build a tree representation of problems from the names:
(Problem view)
Compilation
    Java
        Foo.java#L10: unused variable a
        Foo.java#L20: unused variable b
Since:
8.9
  • Method Details

    • getName

      String getName()
      The name of the problem.

      Then name should be used categorize to create a fully qualified name and to categorize a set of problems. The name itself does not need to be unique, the uniqueness is determined the name and the group hierarchy.

      Since:
      8.9
    • getDisplayName

      @Deprecated String getDisplayName()
      Deprecated.
      Use getName() instead. Ids created from the predefined problem groups have a display name equal to their name. This method will be removed in Gradle 10.
      A human-readable label describing the problem ID.

      The display name should be used to present the problem to the user.

      Returns:
      the display name
      Since:
      8.9
    • getGroup

      ProblemGroup getGroup()
      Returns the container group.
      Returns:
      the group
      Since:
      8.9