Class: SolargraphSyntaxSuggest::SyntaxSuggestReporter
- Inherits:
-
Solargraph::Diagnostics::Base
- Object
- Solargraph::Diagnostics::Base
- SolargraphSyntaxSuggest::SyntaxSuggestReporter
- Defined in:
- lib/solargraph_syntax_suggest/syntax_suggest_reporter.rb
Instance Method Summary collapse
Instance Method Details
#diagnose(source, _api_map) ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/solargraph_syntax_suggest/syntax_suggest_reporter.rb', line 5 def diagnose(source, _api_map) io = StringIO.new ::SyntaxSuggest.call(source: source.code, io:) line_numbers(io).map do ( line: _1, message: io.string.lines.first.chomp, length: source.code.lines[_1].length ) end end |