ProblemCategory

A category is a component of a Problem that helps group related problems together.

A category defines the following hierarchical elements to distinguish instances:

  • namespace
  • category
  • subcategories

The namespace provides separation for identical problems emitted from different components. Problems emitted from Gradle core will use the org.gradle namespace. Third party plugins are expected to use their plugin id for namespace. Problems emitted from build scripts should use the buildscript namespace.

A category should contain the most broad term describing the problem. A few examples are: compilation, deprecation, task-validation.

The problem category can be refined with an optional hierarchy of subcategories. For example, a problem covering a java compilation warning can be denoted with the following subcategories: [java, unused-variable].

The categorization depends on the domain and don't have any constraints. Clients (i.e. IDEs) receiving problems should use the category information for properly group and sort the received instances.

Functions

Link copied to clipboard
abstract fun getCategory(): String
The main category.
Link copied to clipboard
abstract fun getNamespace(): String
The namespace.
Link copied to clipboard
abstract fun getSubCategories(): List<String>
The optional subcategories.