aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-plugin-api
diff options
context:
space:
mode:
authorTeryk Bellahsene <teryk.bellahsene@sonarsource.com>2016-11-11 17:53:49 +0100
committerTeryk Bellahsene <teryk.bellahsene@sonarsource.com>2016-11-11 17:53:49 +0100
commit281f96ab1d6435bb9ff86a06fb5096d98500f1a8 (patch)
tree28274994649a63d748dff812d5c37f5ab5e84c74 /sonar-plugin-api
parent95d094ea70b63f2102b253d136aeaad33bdedf92 (diff)
downloadsonarqube-281f96ab1d6435bb9ff86a06fb5096d98500f1a8.tar.gz
sonarqube-281f96ab1d6435bb9ff86a06fb5096d98500f1a8.zip
SONAR-8329 Get rid of 'Documentation' category in the measures page
Diffstat (limited to 'sonar-plugin-api')
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/measures/CoreMetrics.java28
1 files changed, 19 insertions, 9 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 72a4ec7fd02..dbcafc7e600 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
@@ -54,6 +54,10 @@ public final class CoreMetrics {
@Deprecated
public static String DOMAIN_OVERALL_TESTS = "Tests (Overall)";
public static String DOMAIN_COMPLEXITY = "Complexity";
+ /**
+ * @deprecated since 6.2. Merged into {@link #DOMAIN_SIZE}
+ */
+ @Deprecated
public static String DOMAIN_DOCUMENTATION = "Documentation";
public static String DOMAIN_SCM = "SCM";
public static String DOMAIN_ISSUES = "Issues";
@@ -262,28 +266,34 @@ public final class CoreMetrics {
.setDomain(DOMAIN_SIZE)
.create();
- // --------------------------------------------------------------------------------------------------------------------
- //
- // DOCUMENTATION
- //
- // --------------------------------------------------------------------------------------------------------------------
-
+ /**
+ * Moved to Size domain since 6.2
+ */
public static final String COMMENT_LINES_KEY = "comment_lines";
public static final Metric<Integer> COMMENT_LINES = new Metric.Builder(COMMENT_LINES_KEY, "Comment Lines", Metric.ValueType.INT)
.setDescription("Number of comment lines")
.setDirection(Metric.DIRECTION_BETTER)
.setQualitative(false)
- .setDomain(DOMAIN_DOCUMENTATION)
+ .setDomain(DOMAIN_SIZE)
.create();
+ /**
+ * Moved to Size domain since 6.2
+ */
public static final String COMMENT_LINES_DENSITY_KEY = "comment_lines_density";
public static final Metric<Double> COMMENT_LINES_DENSITY = new Metric.Builder(COMMENT_LINES_DENSITY_KEY, "Comments (%)", Metric.ValueType.PERCENT)
.setDescription("Comments balanced by ncloc + comment lines")
.setDirection(Metric.DIRECTION_BETTER)
.setQualitative(true)
- .setDomain(DOMAIN_DOCUMENTATION)
+ .setDomain(DOMAIN_SIZE)
.create();
+ // --------------------------------------------------------------------------------------------------------------------
+ //
+ // DOCUMENTATION
+ //
+ // --------------------------------------------------------------------------------------------------------------------
+
/**
* @deprecated since 6.2
* @see <a href="https://jira.sonarsource.com/browse/SONAR-8328">SONAR-8328</a>
@@ -2610,7 +2620,7 @@ public final class CoreMetrics {
*/
public static final Metric<String> COMMENT_LINES_DATA = new Metric.Builder(COMMENT_LINES_DATA_KEY, "comment_lines_data", Metric.ValueType.DATA)
.setHidden(true)
- .setDomain(DOMAIN_DOCUMENTATION)
+ .setDomain(DOMAIN_SIZE)
.create();
/**