]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-23298 Add new metrics and change some names
authorDejan Milisavljevic <dejan.milisavljevic@sonarsource.com>
Wed, 23 Oct 2024 13:12:43 +0000 (15:12 +0200)
committersonartech <sonartech@sonarsource.com>
Tue, 5 Nov 2024 20:03:01 +0000 (20:03 +0000)
server/sonar-web/src/main/js/helpers/mocks/metrics.ts
sonar-core/src/main/java/org/sonar/core/metric/SoftwareQualitiesMetrics.java
sonar-core/src/main/resources/org/sonar/l10n/core.properties
sonar-core/src/test/java/org/sonar/core/metric/SoftwareQualitiesMetricsTest.java

index 13e22197e2b0b4704884b8fde7d7b5cefe3806ae..58438bbfaad87b1f0e3b0c4f5c3280b63dbf83a8 100644 (file)
@@ -529,8 +529,8 @@ export const DEFAULT_METRICS: Dict<Metric> = {
     id: 'AY0aC41wVDhd53-OniNc',
     key: 'high_impact_accepted_issues',
     type: 'INT',
-    name: 'High Impact Accepted Issues',
-    description: 'Accepted issues with high impact',
+    name: 'Blocker and High Severity Accepted Issues',
+    description: 'Accepted issues with blocker or high impact',
     domain: 'Issues',
     direction: -1,
     qualitative: false,
index ddac90bfbc41a322f99668c65cf929107dd5c070..66ebb4c776bc9e03fa22f4c2a9f2aad2d9c3cafa 100644 (file)
@@ -23,17 +23,40 @@ import java.util.List;
 import org.sonar.api.measures.Metric;
 import org.sonar.api.measures.Metrics;
 
+import static org.sonar.api.measures.CoreMetrics.DOMAIN_ISSUES;
 import static org.sonar.api.measures.CoreMetrics.DOMAIN_MAINTAINABILITY;
 import static org.sonar.api.measures.CoreMetrics.DOMAIN_RELIABILITY;
 import static org.sonar.api.measures.CoreMetrics.DOMAIN_SECURITY;
 
 public class SoftwareQualitiesMetrics implements Metrics {
 
-  public static final String SOFTWARE_QUALITY_MAINTAINABILITY_RATING_KEY = "software_quality_maintainability_rating";
+  public static final String SOFTWARE_QUALITY_MAINTAINABILITY_ISSUES_KEY = "software_quality_maintainability_issues";
+  public static final Metric<Integer> SOFTWARE_QUALITY_MAINTAINABILITY_ISSUES =
+    new Metric.Builder(SOFTWARE_QUALITY_MAINTAINABILITY_ISSUES_KEY, "Maintainability Issues", Metric.ValueType.INT)
+    .setDescription("Maintainability Issues")
+    .setDirection(Metric.DIRECTION_WORST)
+    .setQualitative(false)
+    .setDomain(DOMAIN_MAINTAINABILITY)
+    .setBestValue(0.0)
+    .setOptimizedBestValue(true)
+    .create();
+
+  public static final String NEW_SOFTWARE_QUALITY_MAINTAINABILITY_ISSUES_KEY = "new_software_quality_maintainability_issues";
+  public static final Metric<Integer> NEW_SOFTWARE_QUALITY_MAINTAINABILITY_ISSUES =
+    new Metric.Builder(NEW_SOFTWARE_QUALITY_MAINTAINABILITY_ISSUES_KEY, "New Maintainability Issues", Metric.ValueType.INT)
+      .setDescription("New Maintainability Issues")
+      .setDirection(Metric.DIRECTION_WORST)
+      .setQualitative(true)
+      .setDomain(DOMAIN_MAINTAINABILITY)
+      .setBestValue(0.0)
+      .setOptimizedBestValue(true)
+      .setDeleteHistoricalData(true)
+      .create();
 
+  public static final String SOFTWARE_QUALITY_MAINTAINABILITY_RATING_KEY = "software_quality_maintainability_rating";
   public static final Metric<Integer> SOFTWARE_QUALITY_MAINTAINABILITY_RATING =
-    new Metric.Builder(SOFTWARE_QUALITY_MAINTAINABILITY_RATING_KEY, "Software Quality Maintainability Rating", Metric.ValueType.RATING)
-      .setDescription("Software quality maintainability rating")
+    new Metric.Builder(SOFTWARE_QUALITY_MAINTAINABILITY_RATING_KEY, "Maintainability Rating", Metric.ValueType.RATING)
+      .setDescription("Maintainability rating")
       .setDomain(DOMAIN_MAINTAINABILITY)
       .setDirection(Metric.DIRECTION_WORST)
       .setQualitative(true)
@@ -42,11 +65,10 @@ public class SoftwareQualitiesMetrics implements Metrics {
       .create();
 
   public static final String NEW_SOFTWARE_QUALITY_MAINTAINABILITY_RATING_KEY = "new_software_quality_maintainability_rating";
-
   public static final Metric<Integer> NEW_SOFTWARE_QUALITY_MAINTAINABILITY_RATING =
-    new Metric.Builder(NEW_SOFTWARE_QUALITY_MAINTAINABILITY_RATING_KEY, "Software Quality Maintainability Rating on New Code",
+    new Metric.Builder(NEW_SOFTWARE_QUALITY_MAINTAINABILITY_RATING_KEY, "Maintainability Rating on New Code",
       Metric.ValueType.RATING)
-      .setDescription("Software quality maintainability rating on new code")
+      .setDescription("Maintainability rating on new code")
       .setDomain(DOMAIN_MAINTAINABILITY)
       .setDirection(Metric.DIRECTION_WORST)
       .setDeleteHistoricalData(true)
@@ -56,11 +78,33 @@ public class SoftwareQualitiesMetrics implements Metrics {
       .setWorstValue(5.0)
       .create();
 
-  public static final String SOFTWARE_QUALITY_RELIABILITY_RATING_KEY = "software_quality_reliability_rating";
+  public static final String SOFTWARE_QUALITY_RELIABILITY_ISSUES_KEY = "software_quality_reliability_issues";
+  public static final Metric<Integer> SOFTWARE_QUALITY_RELIABILITY_ISSUES =
+    new Metric.Builder(SOFTWARE_QUALITY_RELIABILITY_ISSUES_KEY, "Reliability Issues", Metric.ValueType.INT)
+      .setDescription("Reliability Issues")
+      .setDirection(Metric.DIRECTION_WORST)
+      .setQualitative(false)
+      .setDomain(DOMAIN_RELIABILITY)
+      .setBestValue(0.0)
+      .setOptimizedBestValue(true)
+      .create();
+
+  public static final String NEW_SOFTWARE_QUALITY_RELIABILITY_ISSUES_KEY = "new_software_quality_reliability_issues";
+  public static final Metric<Integer> NEW_SOFTWARE_QUALITY_RELIABILITY_ISSUES =
+    new Metric.Builder(NEW_SOFTWARE_QUALITY_RELIABILITY_ISSUES_KEY, "New Reliability Issues", Metric.ValueType.INT)
+      .setDescription("New Reliability Issues")
+      .setDirection(Metric.DIRECTION_WORST)
+      .setQualitative(true)
+      .setDomain(DOMAIN_RELIABILITY)
+      .setBestValue(0.0)
+      .setOptimizedBestValue(true)
+      .setDeleteHistoricalData(true)
+      .create();
 
+  public static final String SOFTWARE_QUALITY_RELIABILITY_RATING_KEY = "software_quality_reliability_rating";
   public static final Metric<Integer> SOFTWARE_QUALITY_RELIABILITY_RATING = new Metric.Builder(SOFTWARE_QUALITY_RELIABILITY_RATING_KEY,
-    "Software Quality Reliability Rating", Metric.ValueType.RATING)
-    .setDescription("Software quality reliability rating")
+    "Reliability Rating", Metric.ValueType.RATING)
+    .setDescription("Reliability rating")
     .setDomain(DOMAIN_RELIABILITY)
     .setDirection(Metric.DIRECTION_WORST)
     .setQualitative(true)
@@ -69,11 +113,9 @@ public class SoftwareQualitiesMetrics implements Metrics {
     .create();
 
   public static final String NEW_SOFTWARE_QUALITY_RELIABILITY_RATING_KEY = "new_software_quality_reliability_rating";
-
   public static final Metric<Integer> NEW_SOFTWARE_QUALITY_RELIABILITY_RATING =
-    new Metric.Builder(NEW_SOFTWARE_QUALITY_RELIABILITY_RATING_KEY,
-    "Software Quality Reliability Rating on New Code", Metric.ValueType.RATING)
-    .setDescription("Software quality reliability rating on new code")
+    new Metric.Builder(NEW_SOFTWARE_QUALITY_RELIABILITY_RATING_KEY, "Reliability Rating on New Code", Metric.ValueType.RATING)
+      .setDescription("Reliability rating on new code")
     .setDomain(DOMAIN_RELIABILITY)
     .setDirection(Metric.DIRECTION_WORST)
     .setDeleteHistoricalData(true)
@@ -83,11 +125,33 @@ public class SoftwareQualitiesMetrics implements Metrics {
     .setWorstValue(5.0)
     .create();
 
-  public static final String SOFTWARE_QUALITY_SECURITY_RATING_KEY = "software_quality_security_rating";
+  public static final String SOFTWARE_QUALITY_SECURITY_ISSUES_KEY = "software_quality_security_issues";
+  public static final Metric<Integer> SOFTWARE_QUALITY_SECURITY_ISSUES =
+    new Metric.Builder(SOFTWARE_QUALITY_SECURITY_ISSUES_KEY, "Security Issues", Metric.ValueType.INT)
+      .setDescription("Security Issues")
+      .setDirection(Metric.DIRECTION_WORST)
+      .setQualitative(false)
+      .setDomain(DOMAIN_SECURITY)
+      .setBestValue(0.0)
+      .setOptimizedBestValue(true)
+      .create();
+
+  public static final String NEW_SOFTWARE_QUALITY_SECURITY_ISSUES_KEY = "new_software_quality_security_issues";
+  public static final Metric<Integer> NEW_SOFTWARE_QUALITY_SECURITY_ISSUES =
+    new Metric.Builder(NEW_SOFTWARE_QUALITY_SECURITY_ISSUES_KEY, "New Security Issues", Metric.ValueType.INT)
+      .setDescription("New Security Issues")
+      .setDirection(Metric.DIRECTION_WORST)
+      .setQualitative(true)
+      .setDomain(DOMAIN_SECURITY)
+      .setBestValue(0.0)
+      .setOptimizedBestValue(true)
+      .setDeleteHistoricalData(true)
+      .create();
 
+  public static final String SOFTWARE_QUALITY_SECURITY_RATING_KEY = "software_quality_security_rating";
   public static final Metric<Integer> SOFTWARE_QUALITY_SECURITY_RATING = new Metric.Builder(SOFTWARE_QUALITY_SECURITY_RATING_KEY,
-    "Software Quality Security Rating", Metric.ValueType.RATING)
-    .setDescription("Software quality security rating")
+    "Security Rating", Metric.ValueType.RATING)
+    .setDescription("Security rating")
     .setDomain(DOMAIN_SECURITY)
     .setDirection(Metric.DIRECTION_WORST)
     .setQualitative(true)
@@ -96,10 +160,9 @@ public class SoftwareQualitiesMetrics implements Metrics {
     .create();
 
   public static final String NEW_SOFTWARE_QUALITY_SECURITY_RATING_KEY = "new_software_quality_security_rating";
-
   public static final Metric<Integer> NEW_SOFTWARE_QUALITY_SECURITY_RATING = new Metric.Builder(NEW_SOFTWARE_QUALITY_SECURITY_RATING_KEY,
-    "Software Quality Security Rating on New Code", Metric.ValueType.RATING)
-    .setDescription("Software quality security rating on new code")
+    "Security Rating on New Code", Metric.ValueType.RATING)
+    .setDescription("Security rating on new code")
     .setDomain(DOMAIN_SECURITY)
     .setDirection(Metric.DIRECTION_WORST)
     .setDeleteHistoricalData(true)
@@ -111,11 +174,10 @@ public class SoftwareQualitiesMetrics implements Metrics {
 
   public static final String EFFORT_TO_REACH_SOFTWARE_QUALITY_MAINTAINABILITY_RATING_A_KEY =
     "effort_to_reach_software_quality_maintainability_rating_a";
-
   public static final Metric<Long> EFFORT_TO_REACH_SOFTWARE_QUALITY_MAINTAINABILITY_RATING_A =
     new Metric.Builder(EFFORT_TO_REACH_SOFTWARE_QUALITY_MAINTAINABILITY_RATING_A_KEY,
-      "Software Quality Effort to Reach Maintainability Rating A", Metric.ValueType.WORK_DUR)
-      .setDescription("Software quality effort to reach maintainability rating A")
+      "Effort to Reach Maintainability Rating A", Metric.ValueType.WORK_DUR)
+      .setDescription("Effort to reach maintainability rating A")
       .setDomain(DOMAIN_MAINTAINABILITY)
       .setDirection(Metric.DIRECTION_WORST)
       .setQualitative(true)
@@ -125,11 +187,11 @@ public class SoftwareQualitiesMetrics implements Metrics {
 
   public static final String SOFTWARE_QUALITY_MAINTAINABILITY_REMEDIATION_EFFORT_KEY =
     "software_quality_maintainability_remediation_effort";
-
   public static final Metric<Long> SOFTWARE_QUALITY_MAINTAINABILITY_REMEDIATION_EFFORT =
-    new Metric.Builder(SOFTWARE_QUALITY_MAINTAINABILITY_REMEDIATION_EFFORT_KEY, "Software Quality Maintainability Remediation Effort",
+    new Metric.Builder(SOFTWARE_QUALITY_MAINTAINABILITY_REMEDIATION_EFFORT_KEY, "Technical Debt",
       Metric.ValueType.WORK_DUR)
-      .setDescription("Software quality total effort (in minutes) to fix all the maintainability issues on the component and therefore to comply to all the requirements.")
+      .setDescription("Total effort (in minutes) to fix all the maintainability issues on the component and therefore to comply to all " +
+        "the requirements.")
       .setDomain(DOMAIN_MAINTAINABILITY)
       .setDirection(Metric.DIRECTION_WORST)
       .setOptimizedBestValue(true)
@@ -139,12 +201,11 @@ public class SoftwareQualitiesMetrics implements Metrics {
 
   public static final String NEW_SOFTWARE_QUALITY_MAINTAINABILITY_REMEDIATION_EFFORT_KEY =
     "new_software_quality_maintainability_remediation_effort";
-
   public static final Metric<Long> NEW_SOFTWARE_QUALITY_MAINTAINABILITY_REMEDIATION_EFFORT =
-    new Metric.Builder(NEW_SOFTWARE_QUALITY_MAINTAINABILITY_REMEDIATION_EFFORT_KEY, "Software Quality Maintainability Remediation Effort on new code",
+    new Metric.Builder(NEW_SOFTWARE_QUALITY_MAINTAINABILITY_REMEDIATION_EFFORT_KEY, "Technical Debt Ratio",
       Metric.ValueType.WORK_DUR)
-      .setDescription("Software quality total effort (in minutes) to fix all the maintainability issues on new code on the component " +
-        "and therefore to comply to all the requirements.")
+      .setDescription("Total effort (in minutes) to fix all the maintainability issues on new code on the component and therefore to " +
+        "comply to all the requirements.")
       .setDomain(DOMAIN_MAINTAINABILITY)
       .setDirection(Metric.DIRECTION_WORST)
       .setOptimizedBestValue(true)
@@ -155,11 +216,10 @@ public class SoftwareQualitiesMetrics implements Metrics {
 
 
   public static final String SOFTWARE_QUALITY_SECURITY_REMEDIATION_EFFORT_KEY = "software_quality_security_remediation_effort";
-
   public static final Metric<Long> SOFTWARE_QUALITY_SECURITY_REMEDIATION_EFFORT =
-    new Metric.Builder(SOFTWARE_QUALITY_SECURITY_REMEDIATION_EFFORT_KEY, "Software Quality Security Remediation Effort",
+    new Metric.Builder(SOFTWARE_QUALITY_SECURITY_REMEDIATION_EFFORT_KEY, "Security Remediation Effort",
       Metric.ValueType.WORK_DUR)
-      .setDescription("Software quality security remediation effort")
+      .setDescription("Security remediation effort")
       .setDomain(DOMAIN_SECURITY)
       .setDirection(Metric.DIRECTION_WORST)
       .setOptimizedBestValue(true)
@@ -168,11 +228,10 @@ public class SoftwareQualitiesMetrics implements Metrics {
       .create();
 
   public static final String NEW_SOFTWARE_QUALITY_SECURITY_REMEDIATION_EFFORT_KEY = "new_software_quality_security_remediation_effort";
-
   public static final Metric<Long> NEW_SOFTWARE_QUALITY_SECURITY_REMEDIATION_EFFORT =
-    new Metric.Builder(NEW_SOFTWARE_QUALITY_SECURITY_REMEDIATION_EFFORT_KEY, "Software Quality Security Remediation Effort on New Code",
+    new Metric.Builder(NEW_SOFTWARE_QUALITY_SECURITY_REMEDIATION_EFFORT_KEY, "Security Remediation Effort on New Code",
       Metric.ValueType.WORK_DUR)
-      .setDescription("Software quality security remediation effort on new code")
+      .setDescription("Security remediation effort on new code")
       .setDomain(DOMAIN_SECURITY)
       .setDirection(Metric.DIRECTION_WORST)
       .setOptimizedBestValue(true)
@@ -182,11 +241,10 @@ public class SoftwareQualitiesMetrics implements Metrics {
       .create();
 
   public static final String SOFTWARE_QUALITY_RELIABILITY_REMEDIATION_EFFORT_KEY = "software_quality_reliability_remediation_effort";
-
   public static final Metric<Long> SOFTWARE_QUALITY_RELIABILITY_REMEDIATION_EFFORT =
-    new Metric.Builder(SOFTWARE_QUALITY_RELIABILITY_REMEDIATION_EFFORT_KEY, "Software Quality Reliability Remediation Effort",
+    new Metric.Builder(SOFTWARE_QUALITY_RELIABILITY_REMEDIATION_EFFORT_KEY, "Reliability Remediation Effort",
       Metric.ValueType.WORK_DUR)
-      .setDescription("Software quality reliability remediation effort")
+      .setDescription("Reliability remediation effort")
       .setDomain(DOMAIN_RELIABILITY)
       .setDirection(Metric.DIRECTION_WORST)
       .setOptimizedBestValue(true)
@@ -196,11 +254,10 @@ public class SoftwareQualitiesMetrics implements Metrics {
 
   public static final String NEW_SOFTWARE_QUALITY_RELIABILITY_REMEDIATION_EFFORT_KEY =
     "new_software_quality_reliability_remediation_effort";
-
   public static final Metric<Long> NEW_SOFTWARE_QUALITY_RELIABILITY_REMEDIATION_EFFORT =
-    new Metric.Builder(NEW_SOFTWARE_QUALITY_RELIABILITY_REMEDIATION_EFFORT_KEY, "Software Quality Reliability Remediation Effort on New Code",
+    new Metric.Builder(NEW_SOFTWARE_QUALITY_RELIABILITY_REMEDIATION_EFFORT_KEY, "Reliability Remediation Effort on New Code",
       Metric.ValueType.WORK_DUR)
-      .setDescription("Software quality reliability remediation effort on new code")
+      .setDescription("Reliability remediation effort on new code")
       .setDomain(DOMAIN_RELIABILITY)
       .setDirection(Metric.DIRECTION_WORST)
       .setOptimizedBestValue(true)
@@ -210,10 +267,9 @@ public class SoftwareQualitiesMetrics implements Metrics {
       .create();
 
   public static final String SOFTWARE_QUALITY_MAINTAINABILITY_DEBT_RATIO_KEY = "software_quality_maintainability_debt_ratio";
-
   public static final Metric<Double> SOFTWARE_QUALITY_MAINTAINABILITY_DEBT_RATIO =
-    new Metric.Builder(SOFTWARE_QUALITY_MAINTAINABILITY_DEBT_RATIO_KEY, "Software Quality Technical Debt Ratio", Metric.ValueType.PERCENT)
-      .setDescription("Software quality ratio of the actual technical debt compared to the estimated cost to develop the whole source code from scratch")
+    new Metric.Builder(SOFTWARE_QUALITY_MAINTAINABILITY_DEBT_RATIO_KEY, "Technical Debt Ratio", Metric.ValueType.PERCENT)
+      .setDescription("Ratio of the actual technical debt compared to the estimated cost to develop the whole source code from scratch")
       .setDomain(DOMAIN_MAINTAINABILITY)
       .setDirection(Metric.DIRECTION_WORST)
       .setOptimizedBestValue(true)
@@ -222,11 +278,10 @@ public class SoftwareQualitiesMetrics implements Metrics {
       .create();
 
   public static final String NEW_SOFTWARE_QUALITY_MAINTAINABILITY_DEBT_RATIO_KEY = "new_software_quality_maintainability_debt_ratio";
-
   public static final Metric<Double> NEW_SOFTWARE_QUALITY_MAINTAINABILITY_DEBT_RATIO =
-    new Metric.Builder(NEW_SOFTWARE_QUALITY_MAINTAINABILITY_DEBT_RATIO_KEY, "Software Quality Technical Debt Ratio on New Code",
+    new Metric.Builder(NEW_SOFTWARE_QUALITY_MAINTAINABILITY_DEBT_RATIO_KEY, "Added Technical Debt",
       Metric.ValueType.PERCENT)
-      .setDescription("Software quality technical debt ratio software quality of new/changed code.")
+      .setDescription("Added Technical Debt")
       .setDomain(DOMAIN_MAINTAINABILITY)
       .setDirection(Metric.DIRECTION_WORST)
       .setOptimizedBestValue(true)
@@ -234,13 +289,136 @@ public class SoftwareQualitiesMetrics implements Metrics {
       .setQualitative(true)
       .create();
 
+  public static final String SOFTWARE_QUALITY_BLOCKER_ISSUES_KEY = "software_quality_blocker_issues";
+  public static final Metric<Integer> SOFTWARE_QUALITY_BLOCKER_ISSUES =
+    new Metric.Builder(SOFTWARE_QUALITY_BLOCKER_ISSUES_KEY, "Blocker Severity Issues", Metric.ValueType.INT)
+      .setDescription("Blocker Severity issues")
+    .setDirection(Metric.DIRECTION_WORST)
+    .setQualitative(true)
+    .setDomain(DOMAIN_ISSUES)
+    .setBestValue(0.0)
+    .setOptimizedBestValue(true)
+    .create();
+
+  public static final String NEW_SOFTWARE_QUALITY_BLOCKER_ISSUES_KEY = "new_software_quality_blocker_issues";
+  public static final Metric<Integer> NEW_SOFTWARE_QUALITY_BLOCKER_ISSUES =
+    new Metric.Builder(NEW_SOFTWARE_QUALITY_BLOCKER_ISSUES_KEY, "New Blocker Severity Issues", Metric.ValueType.INT)
+    .setDescription("New Blocker Severity issues")
+    .setDirection(Metric.DIRECTION_WORST)
+    .setQualitative(true)
+    .setDomain(DOMAIN_ISSUES)
+    .setBestValue(0.0)
+    .setOptimizedBestValue(true)
+    .setDeleteHistoricalData(true)
+    .create();
+
+  public static final String SOFTWARE_QUALITY_HIGH_ISSUES_KEY = "software_quality_high_issues";
+  public static final Metric<Integer> SOFTWARE_QUALITY_HIGH_ISSUES =
+    new Metric.Builder(SOFTWARE_QUALITY_HIGH_ISSUES_KEY, "High Severity Issues", Metric.ValueType.INT)
+      .setDescription("High Severity issues")
+    .setDirection(Metric.DIRECTION_WORST)
+    .setQualitative(true)
+    .setDomain(DOMAIN_ISSUES)
+    .setBestValue(0.0)
+    .setOptimizedBestValue(true)
+    .create();
+
+  public static final String NEW_SOFTWARE_QUALITY_HIGH_ISSUES_KEY = "new_software_quality_high_issues";
+  public static final Metric<Integer> NEW_SOFTWARE_QUALITY_HIGH_ISSUES = new Metric.Builder(NEW_SOFTWARE_QUALITY_HIGH_ISSUES_KEY,
+    "New High Severity Issues", Metric.ValueType.INT)
+    .setDescription("New High Severity issues")
+    .setDirection(Metric.DIRECTION_WORST)
+    .setQualitative(true)
+    .setDomain(DOMAIN_ISSUES)
+    .setBestValue(0.0)
+    .setOptimizedBestValue(true)
+    .setDeleteHistoricalData(true)
+    .create();
+
+  public static final String SOFTWARE_QUALITY_MEDIUM_ISSUES_KEY = "software_quality_medium_issues";
+  public static final Metric<Integer> SOFTWARE_QUALITY_MEDIUM_ISSUES =
+    new Metric.Builder(SOFTWARE_QUALITY_MEDIUM_ISSUES_KEY, "Medium Severity Issues", Metric.ValueType.INT)
+      .setDescription("Medium Severity issues")
+    .setDirection(Metric.DIRECTION_WORST)
+    .setQualitative(true)
+    .setDomain(DOMAIN_ISSUES)
+    .setBestValue(0.0)
+    .setOptimizedBestValue(true)
+    .create();
+
+  public static final String NEW_SOFTWARE_QUALITY_MEDIUM_ISSUES_KEY = "new_software_quality_medium_issues";
+  public static final Metric<Integer> NEW_SOFTWARE_QUALITY_MEDIUM_ISSUES =
+    new Metric.Builder(NEW_SOFTWARE_QUALITY_MEDIUM_ISSUES_KEY, "New Medium Severity Issues", Metric.ValueType.INT)
+    .setDescription("New Medium Severity issues")
+    .setDirection(Metric.DIRECTION_WORST)
+    .setQualitative(true)
+    .setDomain(DOMAIN_ISSUES)
+    .setBestValue(0.0)
+    .setOptimizedBestValue(true)
+    .setDeleteHistoricalData(true)
+    .create();
+
+  public static final String SOFTWARE_QUALITY_LOW_ISSUES_KEY = "software_quality_low_issues";
+  public static final Metric<Integer> SOFTWARE_QUALITY_LOW_ISSUES =
+    new Metric.Builder(SOFTWARE_QUALITY_LOW_ISSUES_KEY, "Low Severity Issues", Metric.ValueType.INT)
+      .setDescription("Low Severity issues")
+    .setDirection(Metric.DIRECTION_WORST)
+    .setQualitative(true)
+    .setDomain(DOMAIN_ISSUES)
+    .setBestValue(0.0)
+    .setOptimizedBestValue(true)
+    .create();
+
+  public static final String NEW_SOFTWARE_QUALITY_LOW_ISSUES_KEY = "new_software_quality_low_issues";
+  public static final Metric<Integer> NEW_SOFTWARE_QUALITY_LOW_ISSUES =
+    new Metric.Builder(NEW_SOFTWARE_QUALITY_LOW_ISSUES_KEY,
+    "New Low Severity Issues", Metric.ValueType.INT)
+    .setDescription("New Low Severity issues")
+    .setDirection(Metric.DIRECTION_WORST)
+    .setQualitative(true)
+    .setDomain(DOMAIN_ISSUES)
+    .setBestValue(0.0)
+    .setOptimizedBestValue(true)
+    .setDeleteHistoricalData(true)
+    .create();
+
+  public static final String SOFTWARE_QUALITY_INFO_ISSUES_KEY = "software_quality_info_issues";
+  public static final Metric<Integer> SOFTWARE_QUALITY_INFO_ISSUES =
+    new Metric.Builder(SOFTWARE_QUALITY_INFO_ISSUES_KEY, "Info Severity Issues", Metric.ValueType.INT)
+      .setDescription("Info Severity issues")
+    .setDirection(Metric.DIRECTION_WORST)
+    .setQualitative(true)
+    .setDomain(DOMAIN_ISSUES)
+    .setBestValue(0.0)
+    .setOptimizedBestValue(true)
+    .create();
+
+  public static final String NEW_SOFTWARE_QUALITY_INFO_ISSUES_KEY = "new_software_quality_info_issues";
+  public static final Metric<Integer> NEW_SOFTWARE_QUALITY_INFO_ISSUES =
+    new Metric.Builder(NEW_SOFTWARE_QUALITY_INFO_ISSUES_KEY, "New Info Severity Issues", Metric.ValueType.INT)
+    .setDescription("New Info Severity issues")
+    .setDirection(Metric.DIRECTION_WORST)
+    .setQualitative(true)
+    .setDomain(DOMAIN_ISSUES)
+    .setBestValue(0.0)
+    .setOptimizedBestValue(true)
+    .setDeleteHistoricalData(true)
+    .create();
+
+
   @Override
   public List<Metric> getMetrics() {
     return List.of(
+      SOFTWARE_QUALITY_MAINTAINABILITY_ISSUES,
+      NEW_SOFTWARE_QUALITY_MAINTAINABILITY_ISSUES,
       SOFTWARE_QUALITY_MAINTAINABILITY_RATING,
       NEW_SOFTWARE_QUALITY_MAINTAINABILITY_RATING,
+      SOFTWARE_QUALITY_RELIABILITY_ISSUES,
+      NEW_SOFTWARE_QUALITY_RELIABILITY_ISSUES,
       SOFTWARE_QUALITY_RELIABILITY_RATING,
       NEW_SOFTWARE_QUALITY_RELIABILITY_RATING,
+      SOFTWARE_QUALITY_SECURITY_ISSUES,
+      NEW_SOFTWARE_QUALITY_SECURITY_ISSUES,
       SOFTWARE_QUALITY_SECURITY_RATING,
       NEW_SOFTWARE_QUALITY_SECURITY_RATING,
       EFFORT_TO_REACH_SOFTWARE_QUALITY_MAINTAINABILITY_RATING_A,
@@ -251,7 +429,17 @@ public class SoftwareQualitiesMetrics implements Metrics {
       SOFTWARE_QUALITY_RELIABILITY_REMEDIATION_EFFORT,
       NEW_SOFTWARE_QUALITY_RELIABILITY_REMEDIATION_EFFORT,
       SOFTWARE_QUALITY_MAINTAINABILITY_DEBT_RATIO,
-      NEW_SOFTWARE_QUALITY_MAINTAINABILITY_DEBT_RATIO
+      NEW_SOFTWARE_QUALITY_MAINTAINABILITY_DEBT_RATIO,
+      SOFTWARE_QUALITY_BLOCKER_ISSUES,
+      NEW_SOFTWARE_QUALITY_BLOCKER_ISSUES,
+      SOFTWARE_QUALITY_HIGH_ISSUES,
+      NEW_SOFTWARE_QUALITY_HIGH_ISSUES,
+      SOFTWARE_QUALITY_MEDIUM_ISSUES,
+      NEW_SOFTWARE_QUALITY_MEDIUM_ISSUES,
+      SOFTWARE_QUALITY_LOW_ISSUES,
+      NEW_SOFTWARE_QUALITY_LOW_ISSUES,
+      SOFTWARE_QUALITY_INFO_ISSUES,
+      NEW_SOFTWARE_QUALITY_INFO_ISSUES
     );
   }
 }
index 6613cc625e4fbb0834517b1dfc7e47e7e6183461..f3a4d75f3833850fcf549c13bb31c133accb731c 100644 (file)
@@ -4334,7 +4334,7 @@ overview.recent_activity=Recent Activity
 overview.accepted_issues=Accepted issues
 overview.accepted_issues.description=Issues that are valid, but were not fixed and represent accepted technical debt.
 overview.accepted_issues.total=Total accepted issues
-overview.high_impact_accepted_issues=High impact accepted issues
+overview.high_impact_accepted_issues=Blocker and High Severity Accepted Issues
 overview.measures.empty_explanation=Measures on New Code will appear after the second analysis of this branch.
 overview.measures.empty_link={learn_more_link} about the Clean as You Code approach.
 overview.measures.same_reference.explanation=This branch is configured to use itself as a reference branch. It will never have New Code.
index a230b33a6d5a8ae154066d7e22842aad12bdc74b..a6a821b59de1b8a21344684faefa1a1d5a23fc4d 100644 (file)
@@ -28,10 +28,16 @@ class SoftwareQualitiesMetricsTest {
   void getMetrics() {
     assertThat(new SoftwareQualitiesMetrics().getMetrics())
       .containsExactlyInAnyOrder(
+        SoftwareQualitiesMetrics.SOFTWARE_QUALITY_MAINTAINABILITY_ISSUES,
+        SoftwareQualitiesMetrics.NEW_SOFTWARE_QUALITY_MAINTAINABILITY_ISSUES,
         SoftwareQualitiesMetrics.SOFTWARE_QUALITY_MAINTAINABILITY_RATING,
         SoftwareQualitiesMetrics.NEW_SOFTWARE_QUALITY_MAINTAINABILITY_RATING,
+        SoftwareQualitiesMetrics.SOFTWARE_QUALITY_RELIABILITY_ISSUES,
+        SoftwareQualitiesMetrics.NEW_SOFTWARE_QUALITY_RELIABILITY_ISSUES,
         SoftwareQualitiesMetrics.SOFTWARE_QUALITY_RELIABILITY_RATING,
         SoftwareQualitiesMetrics.NEW_SOFTWARE_QUALITY_RELIABILITY_RATING,
+        SoftwareQualitiesMetrics.SOFTWARE_QUALITY_SECURITY_ISSUES,
+        SoftwareQualitiesMetrics.NEW_SOFTWARE_QUALITY_SECURITY_ISSUES,
         SoftwareQualitiesMetrics.SOFTWARE_QUALITY_SECURITY_RATING,
         SoftwareQualitiesMetrics.NEW_SOFTWARE_QUALITY_SECURITY_RATING,
         SoftwareQualitiesMetrics.EFFORT_TO_REACH_SOFTWARE_QUALITY_MAINTAINABILITY_RATING_A,
@@ -42,6 +48,17 @@ class SoftwareQualitiesMetricsTest {
         SoftwareQualitiesMetrics.SOFTWARE_QUALITY_RELIABILITY_REMEDIATION_EFFORT,
         SoftwareQualitiesMetrics.NEW_SOFTWARE_QUALITY_RELIABILITY_REMEDIATION_EFFORT,
         SoftwareQualitiesMetrics.SOFTWARE_QUALITY_MAINTAINABILITY_DEBT_RATIO,
-        SoftwareQualitiesMetrics.NEW_SOFTWARE_QUALITY_MAINTAINABILITY_DEBT_RATIO);
+        SoftwareQualitiesMetrics.NEW_SOFTWARE_QUALITY_MAINTAINABILITY_DEBT_RATIO,
+        SoftwareQualitiesMetrics.SOFTWARE_QUALITY_BLOCKER_ISSUES,
+        SoftwareQualitiesMetrics.NEW_SOFTWARE_QUALITY_BLOCKER_ISSUES,
+        SoftwareQualitiesMetrics.SOFTWARE_QUALITY_HIGH_ISSUES,
+        SoftwareQualitiesMetrics.NEW_SOFTWARE_QUALITY_HIGH_ISSUES,
+        SoftwareQualitiesMetrics.SOFTWARE_QUALITY_MEDIUM_ISSUES,
+        SoftwareQualitiesMetrics.NEW_SOFTWARE_QUALITY_MEDIUM_ISSUES,
+        SoftwareQualitiesMetrics.SOFTWARE_QUALITY_LOW_ISSUES,
+        SoftwareQualitiesMetrics.NEW_SOFTWARE_QUALITY_LOW_ISSUES,
+        SoftwareQualitiesMetrics.SOFTWARE_QUALITY_INFO_ISSUES,
+        SoftwareQualitiesMetrics.NEW_SOFTWARE_QUALITY_INFO_ISSUES
+      );
   }
 }