aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-plugin-api
diff options
context:
space:
mode:
authorJean-Baptiste Lievremont <jean-baptiste.lievremont@sonarsource.com>2014-04-24 17:09:41 +0200
committerJean-Baptiste Lievremont <jean-baptiste.lievremont@sonarsource.com>2014-04-24 17:21:30 +0200
commit631797e48ccb77632bc5e6f4f2256561b1aa59f9 (patch)
treef2e3a5b77dd32c7a97364e635e685fc99aed5305 /sonar-plugin-api
parent722b816695bbddcdc454063b0fc9386d8d1a2c4f (diff)
downloadsonarqube-631797e48ccb77632bc5e6f4f2256561b1aa59f9.tar.gz
sonarqube-631797e48ccb77632bc5e6f4f2256561b1aa59f9.zip
SONAR-4927 Store quality gate details in dedicated measure
Diffstat (limited to 'sonar-plugin-api')
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/measures/CoreMetrics.java6
-rw-r--r--sonar-plugin-api/src/test/java/org/sonar/api/resources/CoreMetricsTest.java2
2 files changed, 7 insertions, 1 deletions
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/measures/CoreMetrics.java b/sonar-plugin-api/src/main/java/org/sonar/api/measures/CoreMetrics.java
index b06dd3ad8c6..7ff4bb07bec 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/measures/CoreMetrics.java
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/measures/CoreMetrics.java
@@ -2201,6 +2201,12 @@ public final class CoreMetrics {
.setDomain(DOMAIN_GENERAL)
.create();
+ public static final String QUALITY_GATE_DETAILS_KEY = "quality_gate_details";
+ public static final Metric QUALITY_GATE_DETAILS = new Metric.Builder(QUALITY_GATE_DETAILS_KEY, "Quality Gate Details", Metric.ValueType.DATA)
+ .setDescription("The project detailed status with regard to its quality gate.")
+ .setDomain(DOMAIN_GENERAL)
+ .create();
+
public static final String PROFILE_KEY = "profile";
public static final Metric PROFILE = new Metric.Builder(PROFILE_KEY, "Profile", Metric.ValueType.DATA)
.setDescription("Selected quality profile")
diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/resources/CoreMetricsTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/resources/CoreMetricsTest.java
index fccbb8047c8..1c65ebfb51f 100644
--- a/sonar-plugin-api/src/test/java/org/sonar/api/resources/CoreMetricsTest.java
+++ b/sonar-plugin-api/src/test/java/org/sonar/api/resources/CoreMetricsTest.java
@@ -31,7 +31,7 @@ public class CoreMetricsTest {
@Test
public void shouldReadMetricsFromClassReflection() {
List<Metric> metrics = CoreMetrics.getMetrics();
- assertThat(metrics).hasSize(150);
+ assertThat(metrics).hasSize(151);
assertThat(metrics).contains(CoreMetrics.NCLOC, CoreMetrics.DIRECTORIES);
}
}