15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
# File 'lib/datadog/ci/contrib/simplecov/result_extractor.rb', line 15
def __dd_peek_result
unless datadog_configuration[:enabled]
Datadog.logger.debug("SimpleCov instrumentation is disabled")
return nil
end
result = ::SimpleCov::UselessResultsRemover.call(
::SimpleCov::ResultAdapter.call(::Coverage.peek_result)
)
processed = add_not_loaded_files(result)
if processed.is_a?(::Array)
coverage, not_loaded_files = processed
::SimpleCov::Result.new(coverage, not_loaded_files: not_loaded_files)
else
::SimpleCov::Result.new(processed)
end
end
|