class RuboCop::LSP::Diagnostic
def length_of_line(line)
def length_of_line(line) if @document_encoding == Encoding::UTF_16LE line_length = 0 line.codepoints.each do |codepoint| line_length += 1 line_length += 1 if codepoint > RubyLsp::Document::Scanner::SURROGATE_PAIR_START end line_length else line.length end end