From 281f96ab1d6435bb9ff86a06fb5096d98500f1a8 Mon Sep 17 00:00:00 2001 From: Teryk Bellahsene Date: Fri, 11 Nov 2016 17:53:49 +0100 Subject: [PATCH] SONAR-8329 Get rid of 'Documentation' category in the measures page --- .../org/sonar/api/measures/CoreMetrics.java | 28 +++++++++++++------ 1 file 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 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 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 SONAR-8328 @@ -2610,7 +2620,7 @@ public final class CoreMetrics { */ 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) + .setDomain(DOMAIN_SIZE) .create(); /** -- 2.39.5