diff options
author | Evgeny Mandrikov <mandrikov@gmail.com> | 2011-05-20 00:19:10 +0400 |
---|---|---|
committer | Evgeny Mandrikov <mandrikov@gmail.com> | 2011-05-20 00:28:12 +0400 |
commit | 878cb606b0f6ce51ec2ca3af761968fccbb880ce (patch) | |
tree | 3a22040b18cbb8b6b4fd2dd72b3c7b802f082521 | |
parent | 0c00fc4022d2dd1cc560dad11a7e8113b215a9d3 (diff) | |
download | sonarqube-878cb606b0f6ce51ec2ca3af761968fccbb880ce.tar.gz sonarqube-878cb606b0f6ce51ec2ca3af761968fccbb880ce.zip |
SONAR-2432 Tune best and worst values for coverage metrics
* Define "0" best value on uncovered_lines, uncovered_conditions,
new_uncovered_lines and new_uncovered_conditions
* Define "100" best value and "0" worst value on line_coverage
-rw-r--r-- | sonar-plugin-api/src/main/java/org/sonar/api/measures/CoreMetrics.java | 6 |
1 files changed, 6 insertions, 0 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 cd5c6f0bf75..f0ae320ab20 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 @@ -299,6 +299,7 @@ public final class CoreMetrics { .setDirection(Metric.DIRECTION_WORST) .setDomain(DOMAIN_TESTS) .setFormula(new SumChildValuesFormula(false)) + .setBestValue(0.0) .create(); public static final String NEW_UNCOVERED_LINES_KEY = "new_uncovered_lines"; @@ -307,6 +308,7 @@ public final class CoreMetrics { .setDirection(Metric.DIRECTION_WORST) .setDomain(DOMAIN_TESTS) .setFormula(new SumChildValuesFormula(false)) + .setBestValue(0.0) .create(); public static final String LINE_COVERAGE_KEY = "line_coverage"; @@ -315,6 +317,8 @@ public final class CoreMetrics { .setDirection(Metric.DIRECTION_BETTER) .setQualitative(true) .setDomain(DOMAIN_TESTS) + .setWorstValue(0.0) + .setBestValue(100.0) .create(); public static final String NEW_LINE_COVERAGE_KEY = "new_line_coverage"; @@ -365,6 +369,7 @@ public final class CoreMetrics { .setDirection(Metric.DIRECTION_WORST) .setDomain(DOMAIN_TESTS) .setFormula(new SumChildValuesFormula(false)) + .setBestValue(0.0) .create(); public static final String NEW_UNCOVERED_CONDITIONS_KEY = "new_uncovered_conditions"; @@ -373,6 +378,7 @@ public final class CoreMetrics { .setDirection(Metric.DIRECTION_WORST) .setDomain(DOMAIN_TESTS) .setFormula(new SumChildValuesFormula(false)) + .setBestValue(0.0) .create(); public static final String BRANCH_COVERAGE_KEY = "branch_coverage"; |