File loader.rb
has 660 lines of code (exceeds 250 allowed). Consider refactoring. Open
TOPLEVEL_BINDING = binding()
module Rubinius
class Loader
def initialize
Method options
has 222 lines of code (exceeds 25 allowed). Consider refactoring. Open
def options(argv=ARGV)
@stage = "processing command line arguments"
options = Options.new "Usage: rbx [subcommand] [options] [--] [script] [arguments]", 25
Method options
has a Cognitive Complexity of 42 (exceeds 5 allowed). Consider refactoring. Open
def options(argv=ARGV)
@stage = "processing command line arguments"
options = Options.new "Usage: rbx [subcommand] [options] [--] [script] [arguments]", 25
- 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 Loader
has 37 methods (exceeds 20 allowed). Consider refactoring. Open
class Loader
def initialize
@exit_code = 0
@process_id = Process.pid
@load_paths = []
Method done
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
def done
# check that this is a valid exit rather than failing to process
# unwinding properly.
#
# TODO: this code is pretty gross, nice object inspectors, please.
- 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 script
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
def script
return unless @script and @evals.empty?
@repl = false
- 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 evals
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
def evals
return if @evals.empty?
@repl = false
@stage = "evaluating command line code"
- 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 done
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
def done
# check that this is a valid exit rather than failing to process
# unwinding properly.
#
# TODO: this code is pretty gross, nice object inspectors, please.
Method check_syntax
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def check_syntax
parser_class = Rubinius::ToolSets::Runtime::Melbourne
if @script
if File.exist?(@script)
- 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 handle_simple_options
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def handle_simple_options(argv)
argv.delete_if do |x|
if x[0] == ?-
if equal = x.index("=")
name = x.substring(1, equal-1)
- 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 handle_rubyopt
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def handle_rubyopt(options)
if env_opts = ENV['RUBYOPT']
Rubinius::Logger.system.write "RUBYOPT: #{env_opts}"
options.start_parsing
- 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"