class Rubydex::Linter::RubyLsp::Linter
Constants
- DIAGNOSTIC_SEVERITIES
Attributes
current_diagnostics
[R]
Hash[String, Array[::RubyLsp::Interface::Diagnostic]]
diagnostics_to_clear
[R]
Array[String]
Public Class Methods
(::RubyLsp::GlobalState) → void
Source
# File lib/ruby_lsp/rubydex/addon.rb, line 122 def initialize(global_state) @graph = global_state.graph #: ::Rubydex::Graph @workspace_path = global_state.workspace_path #: String @runner = build_runner #: ::Rubydex::Linter::Runner @current_diagnostics = {} #: Hash[String, Array[::RubyLsp::Interface::Diagnostic]] @diagnostics_to_clear = [] #: Array[String] end
Public Instance Methods
() → void
Source
# File lib/ruby_lsp/rubydex/addon.rb, line 146 def lint! @diagnostics_to_clear = @current_diagnostics.keys @current_diagnostics.clear @runner.run.diagnostics.each do |diagnostic| uri = diagnostic.location.uri (@current_diagnostics[uri] ||= []) << to_lsp_diagnostic(diagnostic) end @diagnostics_to_clear -= @current_diagnostics.keys end
() → void
Source
# File lib/ruby_lsp/rubydex/addon.rb, line 159 def reload_configuration @runner = build_runner end
(URI::Generic, ::RubyLsp::Document[untyped]) → Array[::RubyLsp::Interface::Diagnostic]?
Source
# File lib/ruby_lsp/rubydex/addon.rb, line 133 def run_diagnostic(uri, _document) @current_diagnostics[uri.to_s] end
@override
(URI::Generic, ::RubyLsp::RubyDocument) → String?
Source
# File lib/ruby_lsp/rubydex/addon.rb, line 139 def run_formatting(uri, document); end
@override
(URI::Generic, String, Integer) → String?
Source
# File lib/ruby_lsp/rubydex/addon.rb, line 143 def run_range_formatting(uri, source, base_indentation); end
@override