diff options
author | Julien Lancelot <julien.lancelot@sonarsource.com> | 2019-04-08 15:34:34 +0200 |
---|---|---|
committer | SonarTech <sonartech@sonarsource.com> | 2019-04-23 20:21:10 +0200 |
commit | d4f5c337dc9cc9d88062209b243a0383b4ec3ede (patch) | |
tree | 07f5fd2cd694344d43141c52733f8dd6f6630a8e /sonar-plugin-api | |
parent | df22cb0fe60f1a2375cb87bb8a2bb9ca1bc53103 (diff) | |
download | sonarqube-d4f5c337dc9cc9d88062209b243a0383b4ec3ede.tar.gz sonarqube-d4f5c337dc9cc9d88062209b243a0383b4ec3ede.zip |
SONAR-11892 Compute Security Hotspot measures
Diffstat (limited to 'sonar-plugin-api')
-rw-r--r-- | sonar-plugin-api/src/main/java/org/sonar/api/measures/CoreMetrics.java | 35 |
1 files changed, 35 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 0d6349bc8f8..6a7d13c32b7 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 @@ -1139,6 +1139,41 @@ public final class CoreMetrics { .setDeleteHistoricalData(true) .create(); + /** + * @since 7.8 + */ + public static final String SECURITY_HOTSPOTS_KEY = "security_hotspots"; + + /** + * @since 7.8 + */ + public static final Metric<Integer> SECURITY_HOTSPOTS = new Metric.Builder(SECURITY_HOTSPOTS_KEY, "Security Hotspots", Metric.ValueType.INT) + .setDescription("Security Hotspots") + .setDirection(Metric.DIRECTION_WORST) + .setQualitative(false) + .setDomain(DOMAIN_SECURITY) + .setBestValue(0.0) + .setOptimizedBestValue(true) + .create(); + + /** + * @since 7.8 + */ + public static final String NEW_SECURITY_HOTSPOTS_KEY = "new_security_hotspots"; + + /** + * @since 7.8 + */ + public static final Metric<Integer> NEW_SECURITY_HOTSPOTS = new Metric.Builder(NEW_SECURITY_HOTSPOTS_KEY, "New Security Hotspots", Metric.ValueType.INT) + .setDescription("New Security Hotspots") + .setDirection(Metric.DIRECTION_WORST) + .setQualitative(true) + .setDomain(DOMAIN_SECURITY) + .setBestValue(0.0) + .setOptimizedBestValue(true) + .setDeleteHistoricalData(true) + .create(); + // -------------------------------------------------------------------------------------------------------------------- // // MAINTAINABILITY CHARACTERISTIC |