]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-9721 ES index project_measures indexes 'lines' metric
authorTeryk Bellahsene <teryk.bellahsene@sonarsource.com>
Tue, 29 Aug 2017 16:37:41 +0000 (18:37 +0200)
committerTeryk Bellahsene <teryk@users.noreply.github.com>
Wed, 30 Aug 2017 14:24:53 +0000 (16:24 +0200)
server/sonar-db-dao/src/main/java/org/sonar/db/measure/ProjectMeasuresIndexerIterator.java
server/sonar-server/src/test/java/org/sonar/server/component/ws/SearchProjectsActionTest.java

index 7246fc7243bbc4f125de06a35fca1e8597c856ac..31672e601d9ab354a407622df8fff03e3c8ab982 100644 (file)
@@ -54,6 +54,7 @@ public class ProjectMeasuresIndexerIterator extends CloseableIterator<ProjectMea
 
   public static final Set<String> METRIC_KEYS = ImmutableSortedSet.of(
     CoreMetrics.NCLOC_KEY,
+    CoreMetrics.LINES_KEY,
     CoreMetrics.DUPLICATED_LINES_DENSITY_KEY,
     CoreMetrics.COVERAGE_KEY,
     CoreMetrics.SQALE_RATING_KEY,
index c8bc1fe362e8918f8a3157aca5df958927518413..7fb817f896c9950298d93650252ecf1dd969143a 100644 (file)
@@ -160,10 +160,12 @@ public class SearchProjectsActionTest {
 
     Param sort = def.param("s");
     assertThat(sort.defaultValue()).isEqualTo("name");
-    assertThat(sort.possibleValues()).containsExactlyInAnyOrder("coverage",
+    assertThat(sort.possibleValues()).containsExactlyInAnyOrder(
+      "coverage",
       "reliability_rating",
       "duplicated_lines_density",
       "ncloc_language_distribution",
+      "lines",
       "new_lines",
       "security_rating",
       "new_reliability_rating",