aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-plugin-api/src/main
diff options
context:
space:
mode:
authorJulien Lancelot <julien.lancelot@sonarsource.com>2014-07-10 17:20:58 +0200
committerJulien Lancelot <julien.lancelot@sonarsource.com>2014-07-10 17:20:58 +0200
commit239c1c798c2c7685ab71c1b063072dab0be06aae (patch)
tree1226f18b272474a227dd473d9857720aaca18da1 /sonar-plugin-api/src/main
parente1f4102e815edcf784fba3387613079cfed76559 (diff)
downloadsonarqube-239c1c798c2c7685ab71c1b063072dab0be06aae.tar.gz
sonarqube-239c1c798c2c7685ab71c1b063072dab0be06aae.zip
SONAR-5445 Introduce new metric "SQALE Debt Ratio"
Diffstat (limited to 'sonar-plugin-api/src/main')
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/measures/CoreMetrics.java17
1 files changed, 17 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 c0d57a89728..2545bd0699a 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
@@ -2155,6 +2155,23 @@ public final class CoreMetrics {
.setHidden(true)
.create();
+ /**
+ * @since 4.5
+ */
+ public static final String SQALE_DEBT_RATIO_KEY = "sqale_debt_ratio";
+
+ /**
+ * @since 4.5
+ */
+ public static final Metric<Double> SQALE_DEBT_RATIO = new Metric.Builder(SQALE_DEBT_RATIO_KEY, "SQALE Technical Debt Ratio", Metric.ValueType.PERCENT)
+ .setDescription("Ratio of the technical debt compared to what it would cost to develop the whole source code from scratch.")
+ .setDomain(DOMAIN_TECHNICAL_DEBT)
+ .setDirection(Metric.DIRECTION_WORST)
+ .setOptimizedBestValue(true)
+ .setBestValue(0.0)
+ .setQualitative(true)
+ .create();
+
// --------------------------------------------------------------------------------------------------------------------
//
// FILE DATA