aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-plugin-api
diff options
context:
space:
mode:
authorEvgeny Mandrikov <mandrikov@gmail.com>2012-02-09 19:37:22 +0400
committerEvgeny Mandrikov <mandrikov@gmail.com>2012-02-09 20:31:13 +0400
commitf02ad88827e09165aa7433b2951085db4503055a (patch)
treee94eb00f2f7564c56f561074330a87edc8b23a23 /sonar-plugin-api
parent2a0fef63884f6bd58349bfd1e3a417b9f720f3e5 (diff)
downloadsonarqube-f02ad88827e09165aa7433b2951085db4503055a.tar.gz
sonarqube-f02ad88827e09165aa7433b2951085db4503055a.zip
SONAR-3210 Compute new measure for Java files - comments in file
Diffstat (limited to 'sonar-plugin-api')
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/measures/CoreMetrics.java23
1 files changed, 23 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 45d1bd15619..a8f657d0373 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
@@ -1651,6 +1651,10 @@ public final class CoreMetrics {
public static final String NCLOC_DATA_KEY = "ncloc_data";
/**
+ * Information about lines of code in file.
+ * Key-value pairs, where key - is a number of line, and value - is an indicator of whether line contains code (1) or not (0).
+ *
+ * @see org.sonar.api.measures.FileLinesContext
* @since 2.14
*/
@Beta
@@ -1659,6 +1663,25 @@ public final class CoreMetrics {
.setDomain(DOMAIN_SIZE)
.create();
+ /**
+ * @since 2.14
+ */
+ @Beta
+ public static final String COMMENT_LINES_DATA_KEY = "comment_lines_data";
+
+ /**
+ * Information about comments in file.
+ * Key-value pairs, where key - is a number of line, and value - is an indicator of whether line contains comment (1) or not (0).
+ *
+ * @see org.sonar.api.measures.FileLinesContext
+ * @since 2.14
+ */
+ @Beta
+ public static final Metric COMMENT_LINES_DATA = new Metric.Builder(COMMENT_LINES_DATA_KEY, "comment_lines_data", Metric.ValueType.DATA)
+ .setHidden(true)
+ .setDomain(DOMAIN_DOCUMENTATION)
+ .create();
+
//--------------------------------------------------------------------------------------------------------------------
//
// OTHERS