aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-plugin-api
diff options
context:
space:
mode:
authorTeryk Bellahsene <teryk.bellahsene@sonarsource.com>2016-08-10 18:09:58 +0200
committerTeryk Bellahsene <teryk.bellahsene@sonarsource.com>2016-08-12 15:56:36 +0200
commitde2eaf079f1933eb9dcdb511eeae7207ac4d10c8 (patch)
tree3040ef5e1697bc31b4c79738b404c9964867a45d /sonar-plugin-api
parent531135e491d9cdd11d5b687881945cf88f3ddaae (diff)
downloadsonarqube-de2eaf079f1933eb9dcdb511eeae7207ac4d10c8.tar.gz
sonarqube-de2eaf079f1933eb9dcdb511eeae7207ac4d10c8.zip
SONAR-7951 New metric « Duplicated lines on new code »
Diffstat (limited to 'sonar-plugin-api')
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/measures/CoreMetrics.java10
1 files changed, 10 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 e8916819fbc..11240f588e4 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
@@ -1314,6 +1314,16 @@ public final class CoreMetrics {
.setOptimizedBestValue(true)
.create();
+ public static final String NEW_LINES_DUPLICATED_KEY = "new_duplicated_lines";
+ public static final Metric<Integer> NEW_LINES_DUPLICATED = new Metric.Builder(NEW_LINES_DUPLICATED_KEY, "New Duplicated Lines", Metric.ValueType.INT)
+ .setDescription("New duplicated lines")
+ .setDirection(Metric.DIRECTION_WORST)
+ .setQualitative(true)
+ .setDomain(DOMAIN_DUPLICATIONS)
+ .setBestValue(0.0)
+ .setDeleteHistoricalData(true)
+ .create();
+
public static final String DUPLICATED_BLOCKS_KEY = "duplicated_blocks";
public static final Metric<Integer> DUPLICATED_BLOCKS = new Metric.Builder(DUPLICATED_BLOCKS_KEY, "Duplicated Blocks", Metric.ValueType.INT)
.setDescription("Duplicated blocks")