Class: Solargraph::Diagnostics::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/solargraph/diagnostics/base.rb

Overview

The base class for diagnostics reporters.

Direct Known Subclasses

RequireNotFound, Rubocop, TypeCheck, UpdateErrors

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ Base

Returns a new instance of Base.



11
12
13
# File 'lib/solargraph/diagnostics/base.rb', line 11

def initialize *args
  @args = args
end

Instance Attribute Details

#argsArray<String> (readonly)

Returns:



9
10
11
# File 'lib/solargraph/diagnostics/base.rb', line 9

def args
  @args
end

Instance Method Details

#diagnose(source, api_map) ⇒ Array<Hash>

Perform a diagnosis on a Source within the context of an ApiMap. The result is an array of hash objects that conform to the LSP’s Diagnostic specification.

Subclasses should override this method.

Parameters:

Returns:



24
25
26
# File 'lib/solargraph/diagnostics/base.rb', line 24

def diagnose source, api_map
  []
end