aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-plugin-api/src/main/java
diff options
context:
space:
mode:
authorJulien Lancelot <julien.lancelot@sonarsource.com>2020-02-03 14:10:24 +0100
committerSonarTech <sonartech@sonarsource.com>2020-02-11 20:46:12 +0100
commitc51fa2468cfe46d85b86d8121de84cd0a06fed89 (patch)
tree569fd424ab6500ee1f779c14bedf38502f0155c4 /sonar-plugin-api/src/main/java
parent49a43c2bcafa4b5af52c50b399c772f828d0f534 (diff)
downloadsonarqube-c51fa2468cfe46d85b86d8121de84cd0a06fed89.tar.gz
sonarqube-c51fa2468cfe46d85b86d8121de84cd0a06fed89.zip
SONAR-12962 Compute Security Review measures on Applications
Diffstat (limited to 'sonar-plugin-api/src/main/java')
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/measures/CoreMetrics.java88
1 files changed, 88 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 2f2e58de4c3..4921e34a853 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
@@ -1590,6 +1590,94 @@ public final class CoreMetrics {
.setBestValue(100.0)
.create();
+ /**
+ * @since 8.2
+ */
+ public static final String SECURITY_HOTSPOTS_REVIEWED_STATUS_KEY = "security_hotspots_reviewed_status";
+
+ /**
+ * @since 8.2
+ *
+ * This hidden metric is only needed to compute 'security_review_rating' and 'security_hotspots_reviewed' on Applications.
+ */
+ public static final Metric<Integer> SECURITY_HOTSPOTS_REVIEWED_STATUS = new Metric.Builder(SECURITY_HOTSPOTS_REVIEWED_STATUS_KEY, "Security Review Reviewed Status",
+ Metric.ValueType.INT)
+ .setDescription("Security Review Reviewed Status")
+ .setDirection(Metric.DIRECTION_WORST)
+ .setQualitative(false)
+ .setDomain(DOMAIN_SECURITY_REVIEW)
+ .setBestValue(0.0)
+ .setOptimizedBestValue(true)
+ .setDeleteHistoricalData(true)
+ .setHidden(true)
+ .create();
+
+ /**
+ * @since 8.2
+ */
+ public static final String SECURITY_HOTSPOTS_TO_REVIEW_STATUS_KEY = "security_hotspots_to_review_status";
+
+ /**
+ * @since 8.2
+ *
+ * This hidden metric is only needed to compute 'security_review_rating' and 'security_hotspots_reviewed' on Applications.
+ */
+ public static final Metric<Integer> SECURITY_HOTSPOTS_TO_REVIEW_STATUS = new Metric.Builder(SECURITY_HOTSPOTS_TO_REVIEW_STATUS_KEY, "Security Review To Review Status",
+ Metric.ValueType.INT)
+ .setDescription("Security Review To Review Status")
+ .setDirection(Metric.DIRECTION_WORST)
+ .setQualitative(false)
+ .setDomain(DOMAIN_SECURITY_REVIEW)
+ .setBestValue(0.0)
+ .setOptimizedBestValue(true)
+ .setDeleteHistoricalData(true)
+ .setHidden(true)
+ .create();
+
+ /**
+ * @since 8.2
+ */
+ public static final String NEW_SECURITY_HOTSPOTS_REVIEWED_STATUS_KEY = "new_security_hotspots_reviewed_status";
+
+ /**
+ * @since 8.2
+ *
+ * This hidden metric is only needed to compute 'new_security_review_rating' and 'new_security_hotspots_reviewed' on Applications.
+ */
+ public static final Metric<Integer> NEW_SECURITY_HOTSPOTS_REVIEWED_STATUS = new Metric.Builder(NEW_SECURITY_HOTSPOTS_REVIEWED_STATUS_KEY,
+ "Security Review Reviewed Status on New Code", Metric.ValueType.INT)
+ .setDescription("Security Review Reviewed Status on New Code")
+ .setDirection(Metric.DIRECTION_WORST)
+ .setQualitative(false)
+ .setDomain(DOMAIN_SECURITY_REVIEW)
+ .setBestValue(0.0)
+ .setOptimizedBestValue(true)
+ .setDeleteHistoricalData(true)
+ .setHidden(true)
+ .create();
+
+ /**
+ * @since 8.2
+ */
+ public static final String NEW_SECURITY_HOTSPOTS_TO_REVIEW_STATUS_KEY = "new_security_hotspots_to_review_status";
+
+ /**
+ * @since 8.2
+ *
+ * This hidden metric is only needed to compute 'new_security_review_rating' and 'new_security_hotspots_reviewed' on Applications.
+ */
+ public static final Metric<Integer> NEW_SECURITY_HOTSPOTS_TO_REVIEW_STATUS = new Metric.Builder(NEW_SECURITY_HOTSPOTS_TO_REVIEW_STATUS_KEY,
+ "Security Review To Review Status on New Code", Metric.ValueType.INT)
+ .setDescription("Security Review To Review Status on New Code")
+ .setDirection(Metric.DIRECTION_WORST)
+ .setQualitative(false)
+ .setDomain(DOMAIN_SECURITY_REVIEW)
+ .setBestValue(0.0)
+ .setOptimizedBestValue(true)
+ .setDeleteHistoricalData(true)
+ .setHidden(true)
+ .create();
+
// --------------------------------------------------------------------------------------------------------------------
//
// FILE DATA