]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-5876 add metric new_sqale_debt_ratio to CoreMetrics
authorSébastien Lesaint <sebastien.lesaint@sonarsource.com>
Wed, 16 Sep 2015 14:21:00 +0000 (16:21 +0200)
committerSébastien Lesaint <sebastien.lesaint@sonarsource.com>
Tue, 22 Sep 2015 15:20:56 +0000 (17:20 +0200)
sonar-plugin-api/src/main/java/org/sonar/api/measures/CoreMetrics.java

index dd2e4235f7e9848790bbfc8fa714a1a307a1fe4b..0624872e6175aa3617b57f37f8e3c8acf6cc284d 100644 (file)
@@ -2097,6 +2097,23 @@ public final class CoreMetrics {
     .setQualitative(true)
     .create();
 
+  /**
+   * @since 5.2
+   */
+  public static final String NEW_SQALE_DEBT_RATIO_KEY = "new_sqale_debt_ratio";
+
+  /**
+   * @since 5.2
+   */
+  public static final Metric<Double> NEW_SQALE_DEBT_RATIO = new Metric.Builder(NEW_SQALE_DEBT_RATIO_KEY, "Technical Debt Ratio on new code", Metric.ValueType.PERCENT)
+      .setDescription("Technical Debt Ratio of new/changed code.")
+      .setDomain(DOMAIN_TECHNICAL_DEBT)
+      .setDirection(Metric.DIRECTION_WORST)
+      .setOptimizedBestValue(true)
+      .setBestValue(0.0)
+      .setQualitative(true)
+      .create();
+
   // --------------------------------------------------------------------------------------------------------------------
   //
   // FILE DATA