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


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

def initialize *args
  @args = args
end

Instance Attribute Details

#argsObject (readonly)

Returns the value of attribute args


6
7
8
# File 'lib/solargraph/diagnostics/base.rb', line 6

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.


21
22
23
# File 'lib/solargraph/diagnostics/base.rb', line 21

def diagnose source, api_map
  []
end