public interface SensorDescriptor
Sensor
is doing. Information may be used by the platform
to log interesting information or perform some optimization.
See Sensor.describe(SensorDescriptor)
Modifier and Type | Method and Description |
---|---|
SensorDescriptor |
createIssuesForRuleRepositories(java.lang.String... repositoryKeys)
List rule repositories this
Sensor create issues for. |
SensorDescriptor |
createIssuesForRuleRepository(java.lang.String... repositoryKey)
Rule repository this
Sensor create issues for. |
SensorDescriptor |
global()
This sensor should be executed at the project level, instead of per-module.
|
SensorDescriptor |
name(java.lang.String sensorName)
Displayable name of the
Sensor . |
SensorDescriptor |
onlyOnFileType(InputFile.Type type)
InputFile.Type this Sensor work on. |
SensorDescriptor |
onlyOnLanguage(java.lang.String languageKey)
Language this
Sensor work on. |
SensorDescriptor |
onlyOnLanguages(java.lang.String... languageKeys)
List languages this
Sensor work on. |
SensorDescriptor |
onlyWhenConfiguration(java.util.function.Predicate<Configuration> predicate)
Predicate that will be evaluated on current module/project
Configuration by the platform to decide if execution of the Sensor should be skipped. |
SensorDescriptor |
requireProperties(java.lang.String... propertyKeys)
Deprecated.
since 6.5 use
onlyWhenConfiguration(Predicate) |
SensorDescriptor |
requireProperty(java.lang.String... propertyKey)
Deprecated.
since 6.5 use
onlyWhenConfiguration(Predicate) |
SensorDescriptor name(java.lang.String sensorName)
Sensor
. Will be displayed in logs.SensorDescriptor onlyOnLanguage(java.lang.String languageKey)
SensorDescriptor onlyOnLanguages(java.lang.String... languageKeys)
SensorDescriptor onlyOnFileType(InputFile.Type type)
SensorDescriptor createIssuesForRuleRepository(java.lang.String... repositoryKey)
SensorDescriptor createIssuesForRuleRepositories(java.lang.String... repositoryKeys)
@Deprecated SensorDescriptor requireProperty(java.lang.String... propertyKey)
onlyWhenConfiguration(Predicate)
@Deprecated SensorDescriptor requireProperties(java.lang.String... propertyKeys)
onlyWhenConfiguration(Predicate)
SensorDescriptor global()
SensorDescriptor onlyWhenConfiguration(java.util.function.Predicate<Configuration> predicate)
Configuration
by the platform to decide if execution of the Sensor
should be skipped.