Sha256: a3489eda9ddf6a9fa73dc8631bd2e9558414bbc1249469736ad28373f998dae9

Contents?: true

Size: 1.01 KB

Versions: 18

Compression:

Stored size: 1.01 KB

Contents

use LanguageServer::Protocol::Constant::DiagnosticSeverity as LSPDiagnosticSeverity
use LanguageServer::Protocol::Interface::Diagnostic as LSPDiagnostic

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

      type config = Hash[singleton(Diagnostic::Ruby::Base) | singleton(Diagnostic::Signature::Base), severity?]

      type severity = :error | :warning | :information | :hint

      attr_reader config: config

      attr_reader default_severity: severity

      ERROR: :error

      WARNING: :warning

      INFORMATION: :information

      HINT: :hint

      def initialize: (?config config, ?default_severity: severity) -> void

      def validate_class: (Class klass) -> void

      def validate_severity: (Class | :default klass, severity?) -> void

      def format: (Diagnostic::Ruby::Base | Diagnostic::Signature::Base) -> LSPDiagnostic::json?

      def severity_for: (Diagnostic::Ruby::Base | Diagnostic::Signature::Base) -> LSPDiagnosticSeverity::t?
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
steep-1.7.0.dev.3 sig/steep/diagnostic/lsp_formatter.rbs
steep-1.7.0.dev.2 sig/steep/diagnostic/lsp_formatter.rbs
steep-1.7.0.dev.1 sig/steep/diagnostic/lsp_formatter.rbs
steep-1.6.0 sig/steep/diagnostic/lsp_formatter.rbs
steep-1.6.0.pre.4 sig/steep/diagnostic/lsp_formatter.rbs
steep-1.6.0.pre.3 sig/steep/diagnostic/lsp_formatter.rbs
steep-1.6.0.pre.2 sig/steep/diagnostic/lsp_formatter.rbs
steep-1.6.0.pre.1 sig/steep/diagnostic/lsp_formatter.rbs
steep-1.5.3 sig/steep/diagnostic/lsp_formatter.rbs
steep-1.5.2 sig/steep/diagnostic/lsp_formatter.rbs
steep-1.5.1 sig/steep/diagnostic/lsp_formatter.rbs
steep-1.5.0 sig/steep/diagnostic/lsp_formatter.rbs
steep-1.5.0.pre.6 sig/steep/diagnostic/lsp_formatter.rbs
steep-1.5.0.pre.5 sig/steep/diagnostic/lsp_formatter.rbs
steep-1.5.0.pre.4 sig/steep/diagnostic/lsp_formatter.rbs
steep-1.5.0.pre.3 sig/steep/diagnostic/lsp_formatter.rbs
steep-1.5.0.pre.2 sig/steep/diagnostic/lsp_formatter.rbs
steep-1.5.0.pre.1 sig/steep/diagnostic/lsp_formatter.rbs