class SolargraphInlayHintTest

Public Instance Methods

diagnose(source, _api_map) click to toggle source
# File lib/solargraph_inlay_hint_test.rb, line 6
def diagnose(source, _api_map)
  return [] if source.code.empty? || source.code.start_with?('# a_test_line:')

  [
    {
      range: Solargraph::Range.from_to(0, 0, 0, source.code.lines[0].length),
      severity: Solargraph::Diagnostics::Severities::WARNING,
      source: 'TestLine',
      message: 'File does not start with a_test_line.'
    }
  ]
end