Showing 7 of 7 total issues
Class Runner
has 32 methods (exceeds 20 allowed). Consider refactoring. Open
class Runner
attr_accessor :inspector
def initialize(options = {})
@options = {
Method run
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
def run(paths, options = {})
return unless options[:all] || !paths.empty?
message = "Running: #{options[:all] ? 'all tests' : paths.join(' ')}"
Compat::UI.info message, reset: true
- 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
Method parse_deprecated_options
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def parse_deprecated_options
if @options.key?(:notify)
# TODO: no coverage
Compat::UI.info %(DEPRECATION WARNING: The :notify option is deprecated. Guard notification configuration is used.)
end
- 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
Method notify
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def self.notify(test_count, assertion_count, failure_count, error_count, skip_count, duration)
Method guard_message
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def self.guard_message(test_count, assertion_count, failure_count, error_count, skip_count, duration)
Method spring_command
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def spring_command(paths)
command = @options[:spring].is_a?(String) ? @options[:spring] : 'bin/rake test'
cmd_parts = [command]
cmd_parts << File.expand_path('../runners/old_runner.rb', __FILE__) unless Utils.minitest_version_gte_5? || command != 'spring testunit'
if cli_options.length > 0
- 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
Method plugin_guard_minitest_init
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def self.plugin_guard_minitest_init(options) # :nodoc:
return unless options[:guard]
require 'guard/minitest/utils'
- 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"