]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-6991 remove duplicated_lines_density from metrics allowed in report
authorSébastien Lesaint <sebastien.lesaint@sonarsource.com>
Mon, 9 Nov 2015 13:04:49 +0000 (14:04 +0100)
committerSébastien Lesaint <sebastien.lesaint@sonarsource.com>
Tue, 10 Nov 2015 15:33:31 +0000 (16:33 +0100)
server/sonar-server/src/test/java/org/sonar/server/computation/step/ReportDuplicationMeasuresStepTest.java
sonar-core/src/main/java/org/sonar/core/metric/BatchMetrics.java
sonar-core/src/test/java/org/sonar/core/metric/BatchMetricsTest.java

index 650255cea78c41a63b6b2409fd4764dea0c4ae96..d54c75ed33e8b6a59dcaba1dffaaac1ed6e6c1a7 100644 (file)
@@ -61,20 +61,20 @@ public class ReportDuplicationMeasuresStepTest {
   @Rule
   public TreeRootHolderRule treeRootHolder = new TreeRootHolderRule()
     .setRoot(
-        builder(PROJECT, ROOT_REF)
-            .addChildren(
-                builder(MODULE, MODULE_REF)
-                    .addChildren(
-                        builder(MODULE, SUB_MODULE_REF)
-                            .addChildren(
-                                builder(DIRECTORY, DIRECTORY_REF)
-                                    .addChildren(
-                                        builder(FILE, FILE_1_REF).build(),
-                                        builder(FILE, FILE_2_REF).build())
-                                    .build())
-                            .build())
-                    .build())
-            .build());
+    builder(PROJECT, ROOT_REF)
+      .addChildren(
+        builder(MODULE, MODULE_REF)
+          .addChildren(
+            builder(MODULE, SUB_MODULE_REF)
+              .addChildren(
+                builder(DIRECTORY, DIRECTORY_REF)
+                  .addChildren(
+                    builder(FILE, FILE_1_REF).build(),
+                    builder(FILE, FILE_2_REF).build())
+                  .build())
+              .build())
+          .build())
+      .build());
   @Rule
   public MetricRepositoryRule metricRepository = new MetricRepositoryRule()
     .add(LINES)
index faec6be9514b746ab11c3127f267a497b469eb1b..c32d18eef8a4665e159321dfc05506d73f3ae59d 100644 (file)
@@ -49,7 +49,6 @@ import static org.sonar.api.measures.CoreMetrics.DIRECTORIES;
 import static org.sonar.api.measures.CoreMetrics.DUPLICATED_BLOCKS;
 import static org.sonar.api.measures.CoreMetrics.DUPLICATED_FILES;
 import static org.sonar.api.measures.CoreMetrics.DUPLICATED_LINES;
-import static org.sonar.api.measures.CoreMetrics.DUPLICATED_LINES_DENSITY;
 import static org.sonar.api.measures.CoreMetrics.FILES;
 import static org.sonar.api.measures.CoreMetrics.FILE_COMPLEXITY_DISTRIBUTION;
 import static org.sonar.api.measures.CoreMetrics.FUNCTIONS;
@@ -88,7 +87,7 @@ import static org.sonar.api.measures.CoreMetrics.UNCOVERED_CONDITIONS;
 import static org.sonar.api.measures.CoreMetrics.UNCOVERED_LINES;
 
 /**
- * This class is used to know the list of metrics that can be send in the batch report.
+ * This class is used to know the list of metrics that can be sent in the batch report.
  * <p/>
  * The batch should not send other metrics, and the Compute Engine should not allow other metrics.
  */
@@ -120,7 +119,6 @@ public class BatchMetrics {
     DUPLICATED_LINES,
     DUPLICATED_BLOCKS,
     DUPLICATED_FILES,
-    DUPLICATED_LINES_DENSITY,
 
     COMPLEXITY,
     COMPLEXITY_IN_CLASSES,
index 810e075891657df9b47749bc2e98a8e09ee07058..665191a896acac1612de80ac542db8f60bcc8e89 100644 (file)
@@ -37,7 +37,7 @@ public class BatchMetricsTest {
 
   @Test
   public void check_number_of_allowed_core_metrics() throws Exception {
-    assertThat(SENSOR_METRICS_WITHOUT_METRIC_PLUGIN.getMetrics()).hasSize(53);
+    assertThat(SENSOR_METRICS_WITHOUT_METRIC_PLUGIN.getMetrics()).hasSize(52);
   }
 
   @Test