We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6c402ad commit 8d2cef6Copy full SHA for 8d2cef6
cpp/ql/src/Telemetry/Metrics.qll
@@ -54,7 +54,10 @@ class QualityMetric extends Metric {
54
base_metric = relative_metric.getBaseline() and this = "Percentage of " + relative_metric
55
}
56
57
- override float getValue() { result = 100 * relative_metric.getValue() / base_metric.getValue() }
+ override float getValue() {
58
+ base_metric.getValue() > 0 and
59
+ result = 100 * relative_metric.getValue() / base_metric.getValue()
60
+ }
61
62
63
/** Various metrics we want to report. */
cpp/ql/src/Telemetry/MissingIncludes.ql
@@ -9,4 +9,4 @@
9
import Metrics
10
11
from CppMetrics::MissingIncludeCount e
12
-select e.getIncludeText(), e.getValue() as c order by c desc
+select e.getIncludeText(), e.getValue()
0 commit comments