mirror of
https://github.com/github/codeql.git
synced 2026-04-26 01:05:15 +02:00
C++: Minor edits
This commit is contained in:
@@ -54,7 +54,10 @@ class QualityMetric extends Metric {
|
||||
base_metric = relative_metric.getBaseline() and this = "Percentage of " + relative_metric
|
||||
}
|
||||
|
||||
override float getValue() { result = 100 * relative_metric.getValue() / base_metric.getValue() }
|
||||
override float getValue() {
|
||||
base_metric.getValue() > 0 and
|
||||
result = 100 * relative_metric.getValue() / base_metric.getValue()
|
||||
}
|
||||
}
|
||||
|
||||
/** Various metrics we want to report. */
|
||||
|
||||
@@ -9,4 +9,4 @@
|
||||
import Metrics
|
||||
|
||||
from CppMetrics::MissingIncludeCount e
|
||||
select e.getIncludeText(), e.getValue() as c order by c desc
|
||||
select e.getIncludeText(), e.getValue()
|
||||
|
||||
Reference in New Issue
Block a user