reitzig/texlogparser

View on GitHub
lib/log_parser/log_parser.rb

Summary

Maintainability
A
2 hrs
Test Coverage

Showing 5 of 5 total issues

Assignment Branch Condition size for parse_next_lines is too high. [19.82/15]
Open

def parse_next_lines
raise 'Parse already done!' if @lines.empty?
 
line = @lines.first
Logger.debug "\nLine #{@log_line_number}: '#{line.strip}'"
Severity: Minor
Found in lib/log_parser/log_parser.rb by rubocop

Assignment Branch Condition size for apply_scope_changes is too high. [16.52/15]
Open

def apply_scope_changes
# In the hope that scope changes happen not on the same
# line as messages. Gulp.
scope_changes(@lines.first).each do |op|
if op == :pop
Severity: Minor
Found in lib/log_parser/log_parser.rb by rubocop

Method apply_scope_changes has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
Open

def apply_scope_changes
# In the hope that scope changes happen not on the same
# line as messages. Gulp.
scope_changes(@lines.first).each do |op|
if op == :pop
Severity: Minor
Found in lib/log_parser/log_parser.rb - About 1 hr to fix

Method parse_next_lines has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

def parse_next_lines
raise 'Parse already done!' if @lines.empty?
 
line = @lines.first
Logger.debug "\nLine #{@log_line_number}: '#{line.strip}'"
Severity: Minor
Found in lib/log_parser/log_parser.rb - About 35 mins to fix

Missing space after #.
Open

#Logger.debug "Parsing from '#{log}'"
Severity: Minor
Found in lib/log_parser/log_parser.rb by rubocop
Category
Status