aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-plugin-api
diff options
context:
space:
mode:
authorJulien HENRY <julien.henry@sonarsource.com>2021-12-03 10:56:25 +0100
committersonartech <sonartech@sonarsource.com>2021-12-03 20:03:32 +0000
commit1ffcc9a85c962e716b3c7e0dd73e0a955dd36c69 (patch)
tree345e052939548cd2fa8592755080e7acfe070eaf /sonar-plugin-api
parent0c2ad3d5d708b3d34049767d5b37e7f5d7939325 (diff)
downloadsonarqube-1ffcc9a85c962e716b3c7e0dd73e0a955dd36c69.tar.gz
sonarqube-1ffcc9a85c962e716b3c7e0dd73e0a955dd36c69.zip
SONAR-15761 new API to identify Sensors processing files independently (#5091)
Diffstat (limited to 'sonar-plugin-api')
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/batch/sensor/SensorDescriptor.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/batch/sensor/SensorDescriptor.java b/sonar-plugin-api/src/main/java/org/sonar/api/batch/sensor/SensorDescriptor.java
index 0117afae923..72e8ec2547c 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/batch/sensor/SensorDescriptor.java
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/batch/sensor/SensorDescriptor.java
@@ -83,4 +83,12 @@ public interface SensorDescriptor {
* @since 6.5
*/
SensorDescriptor onlyWhenConfiguration(Predicate<Configuration> predicate);
+
+ /**
+ * Advertise that this sensor process each file independently. It means executing the sensor twice with FileSystem=[FileA] and FileSystem=[FileB] will produce the same result
+ * than executing the sensor only once with FileSystem=[FileA,FileB].
+ * This will allow the platform to optimize sensor execution.
+ * @since 9.3
+ */
+ SensorDescriptor processesFilesIndependently();
}