Module: Datadog::CI::Contrib::Simplecov::ResultExtractor::ClassMethods

Defined in:
lib/datadog/ci/contrib/simplecov/result_extractor.rb

Instance Method Summary collapse

Instance Method Details

#__dd_peek_resultObject



15
16
17
18
19
20
21
22
23
24
25
26
# 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)
  )

  ::SimpleCov::Result.new(add_not_loaded_files(result))
end

#datadog_configurationObject



28
29
30
# File 'lib/datadog/ci/contrib/simplecov/result_extractor.rb', line 28

def datadog_configuration
  Datadog.configuration.ci[:simplecov]
end