Sha256: 72dbfbcce1e1664a7ca9dc04d4ac3ff3182a1c41c5b11b46f5412a38e1a24c5c

Contents?: true

Size: 615 Bytes

Versions: 1

Compression:

Stored size: 615 Bytes

Contents

# frozen_string_literal: true

# example_status reporter for Solargraph
module SolargraphTestCoverage
  class ExampleStatusReporter < Solargraph::Diagnostics::Base
    include ReporterHelpers
    include ReporterGuards
    include DiagnosticMessages

    def diagnose(source, _api_map)
      if source.code.empty? || using_debugger?(source) || !is_test_file?(source) || is_test_support_file?(source)
        return []
      end

      example_failing_errors(source, run_test(source, source.location.filename))
    rescue ChildFailedError => e
      Config.debug? ? [debug_message(e, source)] : []
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
solargraph_test_coverage-0.3.0 lib/solargraph_test_coverage/example_status_reporter.rb