aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-plugin-api/src/main
diff options
context:
space:
mode:
authorJulien HENRY <julien.henry@sonarsource.com>2015-04-01 21:02:38 +0200
committerJulien HENRY <julien.henry@sonarsource.com>2015-04-07 17:20:46 +0200
commitca8ad6b8b61305bd336325d05789da57b76efd7c (patch)
tree8391791a24c49a022d5b62f6d1e17165f4e21504 /sonar-plugin-api/src/main
parentfa3100e005c2fc3884ae6cce708129b71830fe91 (diff)
downloadsonarqube-ca8ad6b8b61305bd336325d05789da57b76efd7c.tar.gz
sonarqube-ca8ad6b8b61305bd336325d05789da57b76efd7c.zip
SONAR-6339 Feed Coverage in compute report
Diffstat (limited to 'sonar-plugin-api/src/main')
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/measures/CoreMetrics.java52
1 files changed, 52 insertions, 0 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 33dc4b35b71..bebf743c01c 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
@@ -24,6 +24,7 @@ import com.google.common.base.Predicate;
import com.google.common.collect.Iterables;
import com.google.common.collect.Lists;
import org.sonar.api.resources.Scopes;
+import org.sonar.api.test.MutableTestPlan;
import org.sonar.api.utils.SonarException;
import javax.annotation.Nullable;
@@ -485,7 +486,15 @@ public final class CoreMetrics {
.setOptimizedBestValue(true)
.create();
+ /**
+ * @deprecated since 5.2 use {@link MutableTestPlan}
+ */
+ @Deprecated
public static final String TEST_DATA_KEY = "test_data";
+ /**
+ * @deprecated since 5.2 use {@link MutableTestPlan}
+ */
+ @Deprecated
public static final Metric<String> TEST_DATA = new Metric.Builder(TEST_DATA_KEY, "Unit tests details", Metric.ValueType.DATA)
.setDescription("Unit tests details")
.setDirection(Metric.DIRECTION_WORST)
@@ -580,12 +589,19 @@ public final class CoreMetrics {
.setDeleteHistoricalData(true)
.create();
+ /**
+ *
+ * @deprecated since 5.2 soon to be removed
+ */
+ @Deprecated
public static final String COVERAGE_LINE_HITS_DATA_KEY = "coverage_line_hits_data";
/**
* Key-value pairs, where key - is a number of line, and value - is a number of hits for this line.
* Use {@link CoverageMeasuresBuilder} to build measure for this metric.
+ * @deprecated since 5.2 soon to be removed
*/
+ @Deprecated
public static final Metric<String> COVERAGE_LINE_HITS_DATA = new Metric.Builder(COVERAGE_LINE_HITS_DATA_KEY, "Coverage hits by line", Metric.ValueType.DATA)
.setDomain(DOMAIN_TESTS)
.setDeleteHistoricalData(true)
@@ -656,25 +672,37 @@ public final class CoreMetrics {
.setDeleteHistoricalData(true)
.create();
+ /**
+ * @deprecated since 5.2 soon to be removed
+ */
+ @Deprecated
public static final String CONDITIONS_BY_LINE_KEY = "conditions_by_line";
/**
* Use {@link CoverageMeasuresBuilder} to build measure for this metric.
*
* @since 2.7
+ * @deprecated since 5.2 soon to be removed
*/
+ @Deprecated
public static final Metric<String> CONDITIONS_BY_LINE = new Metric.Builder(CONDITIONS_BY_LINE_KEY, "Conditions by line", Metric.ValueType.DATA)
.setDomain(DOMAIN_TESTS)
.setDeleteHistoricalData(true)
.create();
+ /**
+ * @deprecated since 5.2 soon to be removed
+ */
+ @Deprecated
public static final String COVERED_CONDITIONS_BY_LINE_KEY = "covered_conditions_by_line";
/**
* Use {@link CoverageMeasuresBuilder} to build measure for this metric.
*
* @since 2.7
+ * @deprecated since 5.2 soon to be removed
*/
+ @Deprecated
public static final Metric<String> COVERED_CONDITIONS_BY_LINE = new Metric.Builder(COVERED_CONDITIONS_BY_LINE_KEY, "Covered conditions by line", Metric.ValueType.DATA)
.setDomain(DOMAIN_TESTS)
.setDeleteHistoricalData(true)
@@ -823,12 +851,16 @@ public final class CoreMetrics {
/**
* @since 2.12
+ * @deprecated since 5.2 soon to be removed
*/
+ @Deprecated
public static final String IT_COVERAGE_LINE_HITS_DATA_KEY = "it_coverage_line_hits_data";
/**
* @since 2.12
+ * @deprecated since 5.2 soon to be removed
*/
+ @Deprecated
public static final Metric<String> IT_COVERAGE_LINE_HITS_DATA = new Metric.Builder(IT_COVERAGE_LINE_HITS_DATA_KEY, "IT coverage hits data", Metric.ValueType.DATA)
.setDescription("Integration Tests Code coverage line hits data")
.setDirection(Metric.DIRECTION_NONE)
@@ -940,12 +972,16 @@ public final class CoreMetrics {
/**
* @since 2.12
+ * @deprecated since 5.2 soon to be removed
*/
+ @Deprecated
public static final String IT_CONDITIONS_BY_LINE_KEY = "it_conditions_by_line";
/**
* @since 2.12
+ * @deprecated since 5.2 soon to be removed
*/
+ @Deprecated
public static final Metric<String> IT_CONDITIONS_BY_LINE = new Metric.Builder(IT_CONDITIONS_BY_LINE_KEY, "IT conditions by line", Metric.ValueType.DATA)
.setDomain(DOMAIN_INTEGRATION_TESTS)
.setDeleteHistoricalData(true)
@@ -953,12 +989,16 @@ public final class CoreMetrics {
/**
* @since 2.12
+ * @deprecated since 5.2 soon to be removed
*/
+ @Deprecated
public static final String IT_COVERED_CONDITIONS_BY_LINE_KEY = "it_covered_conditions_by_line";
/**
* @since 2.12
+ * @deprecated since 5.2 soon to be removed
*/
+ @Deprecated
public static final Metric<String> IT_COVERED_CONDITIONS_BY_LINE = new Metric.Builder(IT_COVERED_CONDITIONS_BY_LINE_KEY, "IT covered conditions by line", Metric.ValueType.DATA)
.setDomain(DOMAIN_INTEGRATION_TESTS)
.setDeleteHistoricalData(true)
@@ -1107,12 +1147,16 @@ public final class CoreMetrics {
/**
* @since 3.3
+ * @deprecated since 5.2 soon to be removed
*/
+ @Deprecated
public static final String OVERALL_COVERAGE_LINE_HITS_DATA_KEY = "overall_coverage_line_hits_data";
/**
* @since 3.3
+ * @deprecated since 5.2 soon to be removed
*/
+ @Deprecated
public static final Metric<String> OVERALL_COVERAGE_LINE_HITS_DATA = new Metric.Builder(OVERALL_COVERAGE_LINE_HITS_DATA_KEY, "Overall coverage hits by line",
Metric.ValueType.DATA)
.setDescription("Coverage hits by all tests and by line")
@@ -1227,12 +1271,16 @@ public final class CoreMetrics {
/**
* @since 3.3
+ * @deprecated since 5.2 soon to be removed
*/
+ @Deprecated
public static final String OVERALL_CONDITIONS_BY_LINE_KEY = "overall_conditions_by_line";
/**
* @since 3.3
+ * @deprecated since 5.2 soon to be removed
*/
+ @Deprecated
public static final Metric<String> OVERALL_CONDITIONS_BY_LINE = new Metric.Builder(OVERALL_CONDITIONS_BY_LINE_KEY, "Overall conditions by line", Metric.ValueType.DATA)
.setDescription("Overall conditions by all tests and by line")
.setDomain(DOMAIN_OVERALL_TESTS)
@@ -1241,12 +1289,16 @@ public final class CoreMetrics {
/**
* @since 3.3
+ * @deprecated since 5.2 soon to be removed
*/
+ @Deprecated
public static final String OVERALL_COVERED_CONDITIONS_BY_LINE_KEY = "overall_covered_conditions_by_line";
/**
* @since 3.3
+ * @deprecated since 5.2 soon to be removed
*/
+ @Deprecated
public static final Metric<String> OVERALL_COVERED_CONDITIONS_BY_LINE = new Metric.Builder(OVERALL_COVERED_CONDITIONS_BY_LINE_KEY, "Overall covered branches by line",
Metric.ValueType.DATA)
.setDescription("Overall covered branches by all tests and by line")