Class: Solargraph::Diagnostics::UpdateErrors

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

Instance Attribute Summary

Attributes inherited from Base

#args

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from Solargraph::Diagnostics::Base

Instance Method Details

#diagnose(source, api_map) ⇒ Object



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

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