diff options
author | Julien Lancelot <julien.lancelot@sonarsource.com> | 2016-10-26 15:56:21 +0200 |
---|---|---|
committer | Julien Lancelot <julien.lancelot@sonarsource.com> | 2016-10-26 17:26:19 +0200 |
commit | ae09c8785766d362986fb499f2ea4ae46b9a34c8 (patch) | |
tree | 4a3ab9ce6dec984ae6b513472653f8b63ca60a85 /sonar-db | |
parent | 59887e4c0a3fb5178dd1792f5c80ce8ae296e508 (diff) | |
download | sonarqube-ae09c8785766d362986fb499f2ea4ae46b9a34c8.tar.gz sonarqube-ae09c8785766d362986fb499f2ea4ae46b9a34c8.zip |
SONAR-8282 Deprecate overall/it coverage fields from file sources
Diffstat (limited to 'sonar-db')
-rw-r--r-- | sonar-db/src/main/java/org/sonar/db/version/v51/FeedFileSourcesBinaryData.java | 18 | ||||
-rw-r--r-- | sonar-db/src/main/protobuf/db-file-sources.proto | 30 |
2 files changed, 25 insertions, 23 deletions
diff --git a/sonar-db/src/main/java/org/sonar/db/version/v51/FeedFileSourcesBinaryData.java b/sonar-db/src/main/java/org/sonar/db/version/v51/FeedFileSourcesBinaryData.java index 9a6f23047e7..49f624799fe 100644 --- a/sonar-db/src/main/java/org/sonar/db/version/v51/FeedFileSourcesBinaryData.java +++ b/sonar-db/src/main/java/org/sonar/db/version/v51/FeedFileSourcesBinaryData.java @@ -93,39 +93,39 @@ public class FeedFileSourcesBinaryData extends BaseDataChange { } s = row.get(3); if (StringUtils.isNotEmpty(s)) { - lineBuilder.setUtLineHits(Integer.parseInt(s)); + lineBuilder.setDeprecatedUtLineHits(Integer.parseInt(s)); } s = row.get(4); if (StringUtils.isNotEmpty(s)) { - lineBuilder.setUtConditions(Integer.parseInt(s)); + lineBuilder.setDeprecatedUtConditions(Integer.parseInt(s)); } s = row.get(5); if (StringUtils.isNotEmpty(s)) { - lineBuilder.setUtCoveredConditions(Integer.parseInt(s)); + lineBuilder.setDeprecatedUtCoveredConditions(Integer.parseInt(s)); } s = row.get(6); if (StringUtils.isNotEmpty(s)) { - lineBuilder.setItLineHits(Integer.parseInt(s)); + lineBuilder.setDeprecatedItLineHits(Integer.parseInt(s)); } s = row.get(7); if (StringUtils.isNotEmpty(s)) { - lineBuilder.setItConditions(Integer.parseInt(s)); + lineBuilder.setDeprecatedItConditions(Integer.parseInt(s)); } s = row.get(8); if (StringUtils.isNotEmpty(s)) { - lineBuilder.setItCoveredConditions(Integer.parseInt(s)); + lineBuilder.setDeprecatedItCoveredConditions(Integer.parseInt(s)); } s = row.get(9); if (StringUtils.isNotEmpty(s)) { - lineBuilder.setOverallLineHits(Integer.parseInt(s)); + lineBuilder.setDeprecatedOverallLineHits(Integer.parseInt(s)); } s = row.get(10); if (StringUtils.isNotEmpty(s)) { - lineBuilder.setOverallConditions(Integer.parseInt(s)); + lineBuilder.setDeprecatedOverallConditions(Integer.parseInt(s)); } s = row.get(11); if (StringUtils.isNotEmpty(s)) { - lineBuilder.setOverallCoveredConditions(Integer.parseInt(s)); + lineBuilder.setDeprecatedOverallCoveredConditions(Integer.parseInt(s)); } s = row.get(12); if (StringUtils.isNotEmpty(s)) { diff --git a/sonar-db/src/main/protobuf/db-file-sources.proto b/sonar-db/src/main/protobuf/db-file-sources.proto index 21b846bb987..8e9550e7027 100644 --- a/sonar-db/src/main/protobuf/db-file-sources.proto +++ b/sonar-db/src/main/protobuf/db-file-sources.proto @@ -40,24 +40,26 @@ message Line { optional string scm_author = 4; optional int64 scm_date = 5; - // unit tests - optional int32 ut_line_hits = 6; - optional int32 ut_conditions = 7; - optional int32 ut_covered_conditions = 8; - - // integration tests - optional int32 it_line_hits = 9; - optional int32 it_conditions = 10; - optional int32 it_covered_conditions = 11; - - // overall tests - optional int32 overall_line_hits = 12; - optional int32 overall_conditions = 13; - optional int32 overall_covered_conditions = 14; + // Deprecated fields in 6.2 (has been deprecated when merging coverage into a single metric) + // They are still used to read coverage info from sources that have not be re-analyzed + optional int32 deprecated_ut_line_hits = 6; + optional int32 deprecated_ut_conditions = 7; + optional int32 deprecated_ut_covered_conditions = 8; + optional int32 deprecated_it_line_hits = 9; + optional int32 deprecated_it_conditions = 10; + optional int32 deprecated_it_covered_conditions = 11; + optional int32 deprecated_overall_line_hits = 12; + optional int32 deprecated_overall_conditions = 13; + optional int32 deprecated_overall_covered_conditions = 14; optional string highlighting = 15; optional string symbols = 16; repeated int32 duplication = 17 [packed = true]; + + // coverage info (since 6.2) + optional int32 line_hits = 18; + optional int32 conditions = 19; + optional int32 covered_conditions = 20; } // TODO should be dropped as it prevents streaming |