module Solargraph::Diagnostics
The Diagnostics library provides reporters for analyzing problems in code and providing the results to language server clients.
Public Class Methods
register(name, klass)
click to toggle source
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]
# File lib/solargraph/diagnostics.rb, line 21 def register name, klass reporter_hash[name] = klass end
reporter(name)
click to toggle source
Find a reporter by name.
@param name [String] The name with which the reporter was registered @return [Class<Solargraph::Diagnostics::Base>]
# File lib/solargraph/diagnostics.rb, line 36 def reporter name reporter_hash[name] end
reporters()
click to toggle source
Get an array of reporter names.
@return [Array<String>]
# File lib/solargraph/diagnostics.rb, line 28 def reporters reporter_hash.keys - ['type_not_defined'] # @todo Hide type_not_defined for now end
Private Class Methods
reporter_hash()
click to toggle source
@return [Hash]
# File lib/solargraph/diagnostics.rb, line 43 def reporter_hash @reporter_hash ||= {} end