diff options
author | Julien Lancelot <julien.lancelot@sonarsource.com> | 2016-09-30 13:15:03 +0200 |
---|---|---|
committer | Julien Lancelot <julien.lancelot@sonarsource.com> | 2016-10-03 18:19:37 +0200 |
commit | bc430dbb92b7b25b3c640625948a37a5a2fa5c16 (patch) | |
tree | df24997fc3b9561111df63a47cb2ac76b4103be8 /sonar-plugin-api/src | |
parent | 328d1094ff11072c9b4448949428d4cd6318bc16 (diff) | |
download | sonarqube-bc430dbb92b7b25b3c640625948a37a5a2fa5c16.tar.gz sonarqube-bc430dbb92b7b25b3c640625948a37a5a2fa5c16.zip |
SONAR-7782 Compute Maintainability Rating on New Code
Diffstat (limited to 'sonar-plugin-api/src')
-rw-r--r-- | sonar-plugin-api/src/main/java/org/sonar/api/measures/CoreMetrics.java | 19 |
1 files changed, 19 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 3be47d98602..2ba6e188ee5 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 @@ -2169,6 +2169,25 @@ public final class CoreMetrics { .create(); /** + * @since 6.2 + */ + public static final String NEW_MAINTAINABILITY_RATING_KEY = "new_maintainability_rating"; + + /** + * @since 6.2 + */ + public static final Metric<Integer> NEW_MAINTAINABILITY_RATING = new Metric.Builder(NEW_MAINTAINABILITY_RATING_KEY, "Maintainability Rating on New Code", Metric.ValueType.RATING) + .setDescription("Maintainability rating on new code") + .setDomain(DOMAIN_MAINTAINABILITY) + .setDirection(Metric.DIRECTION_WORST) + .setDeleteHistoricalData(true) + .setOptimizedBestValue(true) + .setQualitative(true) + .setBestValue(1.0) + .setWorstValue(5.0) + .create(); + + /** * @since 4.5 */ public static final String DEVELOPMENT_COST_KEY = "development_cost"; |