diff options
author | Dejan Milisavljevic <130993898+dejan-milisavljevic-sonarsource@users.noreply.github.com> | 2024-08-14 12:03:22 +0200 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2024-08-26 20:03:06 +0000 |
commit | fc0739fd4eaf7a467de77773be76ddbb5f8040ef (patch) | |
tree | 466d0bc4725038ae206318d8e89ff4fb4bcb8b2d /server/sonar-db-dao | |
parent | 9324868e5ad6264744afd9f5a5ea7555ab2de65b (diff) | |
download | sonarqube-fc0739fd4eaf7a467de77773be76ddbb5f8040ef.tar.gz sonarqube-fc0739fd4eaf7a467de77773be76ddbb5f8040ef.zip |
SONAR-22727 index software qualitiy measure to project measures
Co-authored-by: Léo Geoffroy <leo.geoffroy@sonarsource.com>
Diffstat (limited to 'server/sonar-db-dao')
-rw-r--r-- | server/sonar-db-dao/src/main/java/org/sonar/db/measure/ProjectMeasuresIndexerIterator.java | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/server/sonar-db-dao/src/main/java/org/sonar/db/measure/ProjectMeasuresIndexerIterator.java b/server/sonar-db-dao/src/main/java/org/sonar/db/measure/ProjectMeasuresIndexerIterator.java index 95c0eb350dc..f7d898745b0 100644 --- a/server/sonar-db-dao/src/main/java/org/sonar/db/measure/ProjectMeasuresIndexerIterator.java +++ b/server/sonar-db-dao/src/main/java/org/sonar/db/measure/ProjectMeasuresIndexerIterator.java @@ -40,6 +40,7 @@ import javax.annotation.Nullable; import org.apache.commons.lang3.StringUtils; import org.sonar.api.measures.CoreMetrics; import org.sonar.api.resources.Qualifiers; +import org.sonar.core.metric.SoftwareQualitiesMetrics; import org.sonar.core.util.CloseableIterator; import org.sonar.db.DatabaseUtils; import org.sonar.db.DbSession; @@ -70,7 +71,18 @@ public class ProjectMeasuresIndexerIterator extends CloseableIterator<ProjectMea CoreMetrics.NEW_COVERAGE_KEY, CoreMetrics.NEW_DUPLICATED_LINES_DENSITY_KEY, CoreMetrics.NEW_LINES_KEY, - CoreMetrics.NEW_RELIABILITY_RATING_KEY); + CoreMetrics.NEW_RELIABILITY_RATING_KEY, + + //Ratings based on software quality + SoftwareQualitiesMetrics.SOFTWARE_QUALITY_MAINTAINABILITY_RATING_KEY, + SoftwareQualitiesMetrics.SOFTWARE_QUALITY_RELIABILITY_RATING_KEY, + SoftwareQualitiesMetrics.SOFTWARE_QUALITY_SECURITY_RATING_KEY, + SoftwareQualitiesMetrics.SOFTWARE_QUALITY_SECURITY_REVIEW_RATING_KEY, + SoftwareQualitiesMetrics.NEW_SOFTWARE_QUALITY_SECURITY_RATING_KEY, + SoftwareQualitiesMetrics.NEW_SOFTWARE_QUALITY_SECURITY_REVIEW_RATING_KEY, + SoftwareQualitiesMetrics.NEW_SOFTWARE_QUALITY_MAINTAINABILITY_RATING_KEY, + SoftwareQualitiesMetrics.NEW_SOFTWARE_QUALITY_RELIABILITY_RATING_KEY + ); private static final String SQL_PROJECTS = "SELECT p.uuid, p.kee, p.name, p.created_at, s.created_at, p.tags, p.qualifier " + "FROM projects p " + |