Method read
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
def read(lines)
msg, consumed = super(lines)
is_error = @start_match[1][0] == '!'
Method apply_scope_changes
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
def apply_scope_changes
scope_changes(@lines.first).each do |op|
if op == :pop
Method scope_changes
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
def scope_changes(line)
pushed_dummy = false
result =
case line
Method read
has 31 lines of code (exceeds 25 allowed). Consider refactoring.
def read(lines)
msg, consumed = super(lines)
is_error = @start_match[1][0] == '!'
Method []
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
def [](offset, length = nil)
base_length = length || 1
while offset + base_length > @buffer.size
return (length.nil? ? nil : @buffer[offset, @buffer.size]) if stream_is_done?
@buffer.push(@stream.readline.rstrip)
Method parse_next_lines
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
def parse_next_lines
raise 'Parse already done!' if @lines.empty?
line = @lines.first
Logger.debug "\nLine #{@log_line_number}: '#{line.strip}'"