From e4c87a4b234be1ca315b44f37251f4f2938bc8e3 Mon Sep 17 00:00:00 2001 From: Bert Date: Sun, 8 Feb 2015 19:31:37 +0100 Subject: [PATCH] remove deprecated metric COMMENT_BLANK_LINES --- cxx-squid/src/main/java/org/sonar/cxx/api/CxxMetric.java | 1 - cxx-squid/src/test/java/org/sonar/cxx/api/CxxMetricTest.java | 2 +- .../main/java/org/sonar/plugins/cxx/squid/CxxSquidSensor.java | 1 - 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/cxx-squid/src/main/java/org/sonar/cxx/api/CxxMetric.java b/cxx-squid/src/main/java/org/sonar/cxx/api/CxxMetric.java index 2cf6bc28a5..3b12042b78 100644 --- a/cxx-squid/src/main/java/org/sonar/cxx/api/CxxMetric.java +++ b/cxx-squid/src/main/java/org/sonar/cxx/api/CxxMetric.java @@ -31,7 +31,6 @@ public enum CxxMetric implements MetricDef { CLASSES, COMPLEXITY, COMMENT_LINES, - COMMENT_BLANK_LINES, PUBLIC_API, PUBLIC_UNDOCUMENTED_API; diff --git a/cxx-squid/src/test/java/org/sonar/cxx/api/CxxMetricTest.java b/cxx-squid/src/test/java/org/sonar/cxx/api/CxxMetricTest.java index 189741d227..7bb605a653 100644 --- a/cxx-squid/src/test/java/org/sonar/cxx/api/CxxMetricTest.java +++ b/cxx-squid/src/test/java/org/sonar/cxx/api/CxxMetricTest.java @@ -27,7 +27,7 @@ public class CxxMetricTest { @Test public void test() { - assertThat(CxxMetric.values()).hasSize(11); + assertThat(CxxMetric.values()).hasSize(10); for (CxxMetric metric : CxxMetric.values()) { assertThat(metric.getName()).isEqualTo(metric.name()); diff --git a/sonar-cxx-plugin/src/main/java/org/sonar/plugins/cxx/squid/CxxSquidSensor.java b/sonar-cxx-plugin/src/main/java/org/sonar/plugins/cxx/squid/CxxSquidSensor.java index 4a7cae6f2d..8ba5b5ac6e 100644 --- a/sonar-cxx-plugin/src/main/java/org/sonar/plugins/cxx/squid/CxxSquidSensor.java +++ b/sonar-cxx-plugin/src/main/java/org/sonar/plugins/cxx/squid/CxxSquidSensor.java @@ -163,7 +163,6 @@ private void saveMeasures(org.sonar.api.resources.File sonarFile, SourceFile squ context.saveMeasure(sonarFile, CoreMetrics.FUNCTIONS, squidFile.getDouble(CxxMetric.FUNCTIONS)); context.saveMeasure(sonarFile, CoreMetrics.CLASSES, squidFile.getDouble(CxxMetric.CLASSES)); context.saveMeasure(sonarFile, CoreMetrics.COMPLEXITY, squidFile.getDouble(CxxMetric.COMPLEXITY)); - context.saveMeasure(sonarFile, CoreMetrics.COMMENT_BLANK_LINES, squidFile.getDouble(CxxMetric.COMMENT_BLANK_LINES)); context.saveMeasure(sonarFile, CoreMetrics.COMMENT_LINES, squidFile.getDouble(CxxMetric.COMMENT_LINES)); context.saveMeasure(sonarFile, CoreMetrics.PUBLIC_API, squidFile.getDouble(CxxMetric.PUBLIC_API)); context.saveMeasure(sonarFile, CoreMetrics.PUBLIC_UNDOCUMENTED_API, squidFile.getDouble(CxxMetric.PUBLIC_UNDOCUMENTED_API));