module Solargraph::Diagnostics
The Diagnostics library provides reporters for analyzing problems in code and providing the results to language server clients.
Public Class Methods
Source
# File lib/solargraph/diagnostics.rb, line 22 def register name, klass reporter_hash[name] = klass end
Add a reporter with a name to identify it in .solargraph.yml files.
@param name [String] The name @param klass [Class<Solargraph::Diagnostics::Base>] The class implementation @return [void]
Source
# File lib/solargraph/diagnostics.rb, line 37 def reporter name reporter_hash[name] end
Find a reporter by name.
@param name [String] The name with which the reporter was registered @return [Class<Solargraph::Diagnostics::Base>, nil]
Source
# File lib/solargraph/diagnostics.rb, line 29 def reporters reporter_hash.keys - ['type_not_defined'] # @todo Hide type_not_defined for now end
Get an array of reporter names.
@return [Array<String>]
Private Class Methods
Source
# File lib/solargraph/diagnostics.rb, line 44 def reporter_hash @reporter_hash ||= {} end
@return [Hash{String => Class<Solargraph::Diagnostics::Base>}]