]> source.dussan.org Git - sonarqube.git/commitdiff
Make Xoo Plugin compatible with SonarLint Core
authorDuarte Meneses <duarte.meneses@sonarsource.com>
Mon, 11 Jul 2016 14:36:09 +0000 (16:36 +0200)
committerDuarte Meneses <duarte.meneses@sonarsource.com>
Mon, 11 Jul 2016 14:36:13 +0000 (16:36 +0200)
plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/XooPlugin.java

index 1ff4660920f138121261aeeda5403c07f7d019c6..c1d757812a7da09230e8c971caa5cf24ba29fa50 100644 (file)
@@ -20,6 +20,7 @@
 package org.sonar.xoo;
 
 import org.sonar.api.Plugin;
+import org.sonar.api.SonarProduct;
 import org.sonar.xoo.coverage.ItCoverageSensor;
 import org.sonar.xoo.coverage.OverallCoverageSensor;
 import org.sonar.xoo.coverage.UtCoverageSensor;
@@ -92,13 +93,11 @@ public class XooPlugin implements Plugin {
 
       // sensors
       HasTagSensor.class,
-      MeasureSensor.class,
       LineMeasureSensor.class,
       SyntaxHighlightingSensor.class,
       SymbolReferencesSensor.class,
       ChecksSensor.class,
       RandomAccessSensor.class,
-      DeprecatedResourceApiSensor.class,
       SaveDataTwiceSensor.class,
 
       OneBlockerIssuePerFileSensor.class,
@@ -129,6 +128,11 @@ public class XooPlugin implements Plugin {
       // Other
       XooProjectBuilder.class,
       XooPostJob.class);
+    
+    if(context.getRuntimeProduct() != SonarProduct.SONARLINT) {
+      context.addExtensions(MeasureSensor.class,
+        DeprecatedResourceApiSensor.class);
+    }
 
     if (context.getSonarQubeVersion().isGreaterThanOrEqual(V5_5)) {
       context.addExtension(CpdTokenizerSensor.class);