]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-8281 Rename measure "Coverage by unit tests" -> " "Coverage by tests"
authorJulien HENRY <julien.henry@sonarsource.com>
Wed, 12 Oct 2016 14:49:57 +0000 (16:49 +0200)
committerJulien HENRY <julien.henry@sonarsource.com>
Tue, 18 Oct 2016 14:00:26 +0000 (16:00 +0200)
sonar-core/src/main/resources/org/sonar/l10n/core.properties
sonar-plugin-api/src/main/java/org/sonar/api/measures/CoreMetrics.java
sonar-scanner-engine/src/main/java/org/sonar/scanner/index/DefaultIndex.java
sonar-scanner-engine/src/main/java/org/sonar/scanner/sensor/DefaultSensorStorage.java

index 523e4de12f52be6b4d473a09366b6ef246ca82f6..c3d868e6254ccc4fa829f6011e7562f22a6e0deb 100644 (file)
@@ -2364,7 +2364,7 @@ metric.conditions_to_cover.description=Conditions to cover
 metric.conditions_to_cover.name=Conditions to Cover
 metric.confirmed_issues.description=Confirmed issues
 metric.confirmed_issues.name=Confirmed Issues
-metric.coverage.description=Coverage by unit tests
+metric.coverage.description=Coverage by tests
 metric.coverage.name=Coverage
 metric.coverage_line_hits_data.description=Coverage hits by line
 metric.coverage_line_hits_data.name=Coverage Hits by Line
index 164386e9b588e28f89a8376d0703351f05aedaaf..7cd75d43f81183c457b0e53a4c5996c9f59fb592 100644 (file)
@@ -527,7 +527,7 @@ public final class CoreMetrics {
 
   public static final String COVERAGE_KEY = "coverage";
   public static final Metric<Double> COVERAGE = new Metric.Builder(COVERAGE_KEY, "Coverage", Metric.ValueType.PERCENT)
-    .setDescription("Coverage by unit tests")
+    .setDescription("Coverage by tests")
     .setDirection(Metric.DIRECTION_BETTER)
     .setQualitative(true)
     .setDomain(DOMAIN_COVERAGE)
index 4cb9f5b48d8d0e50d278a59c2a15642010c21efc..cf929bc3271c4092cb3cae655eb9766013728921 100644 (file)
@@ -161,7 +161,7 @@ public class DefaultIndex {
   public Measure addMeasure(Resource resource, Measure measure) {
     Bucket bucket = getBucket(resource);
     if (bucket != null) {
-      return sensorStorage.saveMeasure(resource, measure);
+      sensorStorage.saveMeasure(resource, measure);
     }
     return measure;
   }
index f50c95e41d2a53d2aa765fe015f00e82fc7a53d8..1c2f90b686f33b8f9fd9de0375e6d330337a2066 100644 (file)
@@ -137,10 +137,10 @@ public class DefaultSensorStorage implements SensorStorage {
     }
   }
 
-  public org.sonar.api.measures.Measure saveMeasure(Resource resource, org.sonar.api.measures.Measure measure) {
+  public void saveMeasure(Resource resource, org.sonar.api.measures.Measure measure) {
     if (DEPRECATED_METRICS_KEYS.contains(measure.getMetricKey())) {
       // Ignore deprecated metrics
-      return null;
+      return;
     }
     org.sonar.api.batch.measure.Metric metric = metricFinder.findByKey(measure.getMetricKey());
     if (metric == null) {
@@ -148,13 +148,11 @@ public class DefaultSensorStorage implements SensorStorage {
     }
     if (!measure.isFromCore() && INTERNAL_METRICS.contains(metric)) {
       LOG.debug("Metric " + metric.key() + " is an internal metric computed by SonarQube. Provided value is ignored.");
-      return measure;
     }
     if (measureCache.contains(resource, measure)) {
       throw new SonarException("Can not add the same measure twice on " + resource + ": " + measure);
     }
     measureCache.put(resource, measure);
-    return measure;
   }
 
   private void setValueAccordingToMetricType(Measure<?> measure, org.sonar.api.measures.Metric<?> m, org.sonar.api.measures.Measure measureToSave) {