Package org.sonar.api.batch.sensor
Interface SensorDescriptor
-
- All Known Implementing Classes:
DefaultSensorDescriptor
public interface SensorDescriptorDescribe what aSensoris doing. Information may be used by the platform to log interesting information or perform some optimization. SeeSensor.describe(SensorDescriptor)- Since:
- 5.1
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description SensorDescriptorcreateIssuesForRuleRepositories(java.lang.String... repositoryKeys)List rule repositories thisSensorcreate issues for.SensorDescriptorcreateIssuesForRuleRepository(java.lang.String... repositoryKey)Rule repository thisSensorcreate issues for.SensorDescriptorglobal()Deprecated.since 7.6 change yourSensorto aProjectSensorinsteadSensorDescriptorname(java.lang.String sensorName)Displayable name of theSensor.SensorDescriptoronlyOnFileType(InputFile.Type type)InputFile.TypethisSensorwork on.SensorDescriptoronlyOnLanguage(java.lang.String languageKey)Language thisSensorwork on.SensorDescriptoronlyOnLanguages(java.lang.String... languageKeys)List languages thisSensorwork on.SensorDescriptoronlyWhenConfiguration(java.util.function.Predicate<Configuration> predicate)Predicate that will be evaluated on current projectConfigurationby the platform to decide if execution of theSensorshould be skipped.SensorDescriptorrequireProperties(java.lang.String... propertyKeys)Deprecated.since 6.5 useonlyWhenConfiguration(Predicate)SensorDescriptorrequireProperty(java.lang.String... propertyKey)Deprecated.since 6.5 useonlyWhenConfiguration(Predicate)
-
-
-
Method Detail
-
name
SensorDescriptor name(java.lang.String sensorName)
Displayable name of theSensor. Will be displayed in logs.
-
onlyOnLanguage
SensorDescriptor onlyOnLanguage(java.lang.String languageKey)
-
onlyOnLanguages
SensorDescriptor onlyOnLanguages(java.lang.String... languageKeys)
-
onlyOnFileType
SensorDescriptor onlyOnFileType(InputFile.Type type)
InputFile.TypethisSensorwork on. Used by the platform to skip execution of theSensorwhen no file for given type are present in the project. Default is to execute sensor whatever are the available file types.
-
createIssuesForRuleRepository
SensorDescriptor createIssuesForRuleRepository(java.lang.String... repositoryKey)
-
createIssuesForRuleRepositories
SensorDescriptor createIssuesForRuleRepositories(java.lang.String... repositoryKeys)
-
requireProperty
@Deprecated SensorDescriptor requireProperty(java.lang.String... propertyKey)
Deprecated.since 6.5 useonlyWhenConfiguration(Predicate)
-
requireProperties
@Deprecated SensorDescriptor requireProperties(java.lang.String... propertyKeys)
Deprecated.since 6.5 useonlyWhenConfiguration(Predicate)
-
global
@Deprecated SensorDescriptor global()
Deprecated.since 7.6 change yourSensorto aProjectSensorinsteadThis sensor should be executed at the project level, instead of per-module.- Since:
- 6.4
-
onlyWhenConfiguration
SensorDescriptor onlyWhenConfiguration(java.util.function.Predicate<Configuration> predicate)
Predicate that will be evaluated on current projectConfigurationby the platform to decide if execution of theSensorshould be skipped.- Since:
- 6.5
-
-