Module: Solargraph::Diagnostics
- Defined in:
- lib/solargraph/diagnostics.rb,
lib/solargraph/diagnostics/base.rb,
lib/solargraph/diagnostics/rubocop.rb,
lib/solargraph/diagnostics/severities.rb,
lib/solargraph/diagnostics/update_errors.rb,
lib/solargraph/diagnostics/type_not_defined.rb,
lib/solargraph/diagnostics/require_not_found.rb
Overview
The Diagnostics library provides reporters for analyzing problems in code and providing the results to language server clients.
Defined Under Namespace
Modules: Severities Classes: Base, RequireNotFound, Rubocop, TypeNotDefined, UpdateErrors
Class Method Summary collapse
-
.register(name, klass) ⇒ void
Add a reporter with a name to identify it in .solargraph.yml files.
-
.reporter(name) ⇒ Class<Solargraph::Diagnostics::Base>
Find a reporter by name.
-
.reporters ⇒ Array<String>
Get an array of reporter names.
Class Method Details
.register(name, klass) ⇒ void
This method returns an undefined value.
Add a reporter with a name to identify it in .solargraph.yml files.
19 20 21 |
# File 'lib/solargraph/diagnostics.rb', line 19 def register name, klass reporter_hash[name] = klass end |
.reporter(name) ⇒ Class<Solargraph::Diagnostics::Base>
Find a reporter by name.
34 35 36 |
# File 'lib/solargraph/diagnostics.rb', line 34 def reporter name reporter_hash[name] end |
.reporters ⇒ Array<String>
Get an array of reporter names.
26 27 28 |
# File 'lib/solargraph/diagnostics.rb', line 26 def reporters reporter_hash.keys end |