Class: Solargraph::Diagnostics::UpdateErrors

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

Instance Method Summary collapse

Instance Method Details

#diagnose(source, api_map) ⇒ Object



4
5
6
7
8
9
10
11
12
13
14
15
# File 'lib/solargraph/diagnostics/update_errors.rb', line 4

def diagnose source, api_map
  result = []
  combine_ranges(source.code, source.error_ranges).each do |range|
    result.push(
      range: range.to_hash,
      severity: Diagnostics::Severities::ERROR,
      source: 'Solargraph',
      message: 'Syntax error'
    )
  end
  result
end