Sha256: 9a39a32cca0e59b803b744b8ab2758a2b9182ea18d5bb6f84b8261cac0b0997b

Contents?: true

Size: 409 Bytes

Versions: 8

Compression:

Stored size: 409 Bytes

Contents

module Steep
  module Diagnostic
    class LSPFormatter
      LSP = LanguageServer::Protocol

      def format(diagnostic)
        LSP::Interface::Diagnostic.new(
          message: diagnostic.full_message,
          code: diagnostic.diagnostic_code,
          severity: LSP::Constant::DiagnosticSeverity::ERROR,
          range: diagnostic.location.as_lsp_range
        ).to_hash
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
steep-0.45.0 lib/steep/diagnostic/lsp_formatter.rb
steep-0.44.1 lib/steep/diagnostic/lsp_formatter.rb
steep-0.44.0 lib/steep/diagnostic/lsp_formatter.rb
steep-0.43.1 lib/steep/diagnostic/lsp_formatter.rb
steep-0.43.0 lib/steep/diagnostic/lsp_formatter.rb
steep-0.42.0 lib/steep/diagnostic/lsp_formatter.rb
steep-0.41.0 lib/steep/diagnostic/lsp_formatter.rb
steep-0.40.0 lib/steep/diagnostic/lsp_formatter.rb