Showing 10 of 12 total issues
Class Simple
has 37 methods (exceeds 20 allowed). Consider refactoring. Open
Open
class Simple < Formatter
PASS = "✓"
FAIL = "✗"
PENDING = "⧖"
Method parse
has 119 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def parse(text)
update_test_state(text)
update_error_state(text)
update_linker_failure_state(text)
File parser.rb
has 339 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
module XCPretty
module Matchers
# @regex Captured groups
Method status_symbol
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
Open
def status_symbol(status)
case status
when :pass
green(use_unicode? ? PASS : ASCII_PASS)
when :fail
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Class Parser
has 22 methods (exceeds 20 allowed). Consider refactoring. Open
Open
class Parser
include Matchers
include Matchers::Errors
include Matchers::Warnings
Method format_compile_error
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def format_compile_error(file_name, file_path, reason,
line, cursor); EMPTY; end
Method format_compile_warning
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def format_compile_warning(file, file_path, reason, line, cursor)
Method format_compile_warning
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def format_compile_warning(file_name, file_path, reason,
line, cursor); EMPTY; end
Method format_compile_error
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def format_compile_error(file, file_path, reason, line, cursor)
Method load_screenshots
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
Open
def load_screenshots
Dir.foreach(SCREENSHOT_DIR) do |item|
next if item == '.' || item == '..' || File.extname(item) != '.png'
test = find_test(item)
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"