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
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)
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;
}
}
}
- 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) {
}
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) {