From 95d094ea70b63f2102b253d136aeaad33bdedf92 Mon Sep 17 00:00:00 2001 From: Teryk Bellahsene Date: Fri, 11 Nov 2016 17:28:23 +0100 Subject: [PATCH] SONAR-8328 SONAR-4872 Deprecate and Hide metrics public_api, public_documented_api_density and public_undocumented_api --- .../org/sonar/api/measures/CoreMetrics.java | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) 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 b24f91024ce..72a4ec7fd02 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 @@ -233,12 +233,18 @@ public final class CoreMetrics { .setDomain(DOMAIN_SIZE) .create(); + /** + * @deprecated since 6.2 + * @see SONAR-8328 + */ + @Deprecated public static final String PUBLIC_API_KEY = "public_api"; public static final Metric PUBLIC_API = new Metric.Builder(PUBLIC_API_KEY, "Public API", Metric.ValueType.INT) .setDescription("Public API") .setDirection(Metric.DIRECTION_WORST) .setQualitative(false) .setDomain(DOMAIN_DOCUMENTATION) + .setHidden(true) .create(); /** @@ -278,6 +284,11 @@ public final class CoreMetrics { .setDomain(DOMAIN_DOCUMENTATION) .create(); + /** + * @deprecated since 6.2 + * @see SONAR-8328 + */ + @Deprecated public static final String PUBLIC_DOCUMENTED_API_DENSITY_KEY = "public_documented_api_density"; public static final Metric PUBLIC_DOCUMENTED_API_DENSITY = new Metric.Builder(PUBLIC_DOCUMENTED_API_DENSITY_KEY, "Public Documented API (%)", Metric.ValueType.PERCENT) .setDescription("Public documented classes and functions balanced by ncloc") @@ -287,8 +298,14 @@ public final class CoreMetrics { .setWorstValue(0.0) .setBestValue(100.0) .setOptimizedBestValue(true) + .setHidden(true) .create(); + /** + * @deprecated since 6.2 + * @see SONAR-8328 + */ + @Deprecated public static final String PUBLIC_UNDOCUMENTED_API_KEY = "public_undocumented_api"; public static final Metric PUBLIC_UNDOCUMENTED_API = new Metric.Builder(PUBLIC_UNDOCUMENTED_API_KEY, "Public Undocumented API", Metric.ValueType.INT) .setDescription("Public undocumented classes, functions and variables") @@ -298,6 +315,7 @@ public final class CoreMetrics { .setBestValue(0.0) .setDirection(Metric.DIRECTION_WORST) .setOptimizedBestValue(true) + .setHidden(true) .create(); /** -- 2.39.5