class RubyLsp::Requests::Support::RuboCopDiagnostic
def length_of_line(line)
def length_of_line(line) if @document.encoding == Constant::PositionEncodingKind::UTF16 line_length = 0 line.codepoints.each do |codepoint| line_length += 1 if codepoint > RubyLsp::Document::Scanner::SURROGATE_PAIR_START line_length += 1 end end line_length else line.length end end