diff --git a/cpp/ql/src/Telemetry/Metrics.qll b/cpp/ql/src/Telemetry/Metrics.qll index b3c90af84501..dac935caf0cf 100644 --- a/cpp/ql/src/Telemetry/Metrics.qll +++ b/cpp/ql/src/Telemetry/Metrics.qll @@ -266,4 +266,12 @@ module CppMetrics { override int getValue() { result = count(SyntaxError e) } } + + class BuildModeNone extends ExtractionMetric { + BuildModeNone() { this = "build mode none" } + + override int getValue() { + if exists(Compilation c | c.buildModeNone()) then result = 1 else result = 0 + } + } } diff --git a/cpp/ql/test/library-tests/extraction_errors/ExtractionMetrics.expected b/cpp/ql/test/library-tests/extraction_errors/ExtractionMetrics.expected index ee2cc0f99630..90ffa5a0e98d 100644 --- a/cpp/ql/test/library-tests/extraction_errors/ExtractionMetrics.expected +++ b/cpp/ql/test/library-tests/extraction_errors/ExtractionMetrics.expected @@ -1,4 +1,5 @@ | #include directives | 2 | +| build mode none | 0 | | calls | 2 | | calls with an explicit target | 1 | | compilations | 2 |