Showing 355 of 499 total issues
Method hessenberg_to_real_schur
has a Cognitive Complexity of 184 (exceeds 5 allowed). Consider refactoring. Open
def hessenberg_to_real_schur
# This is derived from the Algol procedure hqr2,
# by Martin and Wilkinson, Handbook for Auto. Comp.,
# Vol.ii-Linear Algebra, and the corresponding
- 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
File array.rb
has 2002 lines of code (exceeds 1000 allowed). Consider refactoring. Open
require 'corelib/enumerable'
require 'corelib/numeric'
class ::Array < `Array`
include ::Enumerable
File runtime.js
has 2000 lines of code (exceeds 1000 allowed). Consider refactoring. Open
(function(global_object) {
"use strict";
// @note
// A few conventions for the documentation of this file:
Method parse_in_order
has a Cognitive Complexity of 109 (exceeds 5 allowed). Consider refactoring. Open
def parse_in_order(argv = default_argv, setter = nil, &nonopt) # :nodoc:
opt, arg, val, rest = nil
nonopt ||= proc { |a| throw :terminate, a }
argv.unshift(arg) if arg = catch(:terminate) do
while arg = argv.shift
- 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
File string.rb
has 1595 lines of code (exceeds 1000 allowed). Consider refactoring. Open
require 'corelib/comparable'
require 'corelib/regexp'
class ::String < `String`
include ::Comparable
Method make_switch
has a Cognitive Complexity of 100 (exceeds 5 allowed). Consider refactoring. Open
def make_switch(opts, block = nil)
short, long, nolong, style, pattern, conv, not_pattern, not_conv, not_style = [], [], []
ldesc, sdesc, desc, arg = [], [], []
default_style = Switch::NoArgument
default_pattern = nil
- 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 hessenberg_to_real_schur
has 332 lines of code (exceeds 30 allowed). Consider refactoring. Open
def hessenberg_to_real_schur
# This is derived from the Algol procedure hqr2,
# by Martin and Wilkinson, Handbook for Auto. Comp.,
# Vol.ii-Linear Algebra, and the corresponding
Method parse
has 225 lines of code (exceeds 30 allowed). Consider refactoring. Open
def parse(string, comp = true)
%x{
var current_date = new Date();
var current_day = current_date.getDate(),
Method strftime
has 206 lines of code (exceeds 30 allowed). Consider refactoring. Open
def strftime(format)
%x{
return format.replace(/%([\-_#^0]*:{0,2})(\d+)?([EO]*)(.)/g, function(full, flags, width, _, conv) {
var result = "", jd, c, s,
zero = flags.indexOf('0') !== -1,
Method _racc_evalact
has a Cognitive Complexity of 47 (exceeds 5 allowed). Consider refactoring. Open
def _racc_evalact(act, arg)
action_table, action_check, _, action_pointer,
_, _, _, _,
_, _, _, shift_n, reduce_n,
_, _, * = arg
- 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 initialize
has 163 lines of code (exceeds 30 allowed). Consider refactoring. Open
def initialize
super
@options = {}
self.banner = 'Usage: opal [options] -- [programfile]'
Method thrower
has a Cognitive Complexity of 39 (exceeds 5 allowed). Consider refactoring. Open
def thrower(type, value = nil)
case type
when :return
thrower_closure = select_closure(DEF, break_after: MODULE | TOP)
last_closure = select_closure(JS_FUNCTION)
- 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 tr_s
has 149 lines of code (exceeds 30 allowed). Consider refactoring. Open
def tr_s(from, to)
%x{
from = $coerce_to(from, #{::String}, 'to_str').$to_s();
to = $coerce_to(to, #{::String}, 'to_str').$to_s();
Method irb
has a Cognitive Complexity of 38 (exceeds 5 allowed). Consider refactoring. Open
def irb
::Opal::IRB.ensure_loaded('opal-replutils')
silencer = ::Opal::IRB::Silencer.new
- 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 compile
has a Cognitive Complexity of 38 (exceeds 5 allowed). Consider refactoring. Open
def compile
compiler.top_scope = self
compiler.dynamic_cache_result = true if sexp.meta[:dynamic_cache_result]
push version_comment
- 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 _racc_do_parse_rb
has a Cognitive Complexity of 38 (exceeds 5 allowed). Consider refactoring. Open
def _racc_do_parse_rb(arg, in_debug)
action_table, action_check, action_default, action_pointer,
_, _, _, _,
_, _, token_table, _,
_, _, * = arg
- 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 fill
has a Cognitive Complexity of 37 (exceeds 5 allowed). Consider refactoring. Open
def fill(*args, &block)
%x{
$deny_frozen_access(self);
var i, length, value;
- 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 gets
has a Cognitive Complexity of 35 (exceeds 5 allowed). Consider refactoring. Open
def gets(sep = false, limit = nil, opts = {})
if `sep.$$is_number` && !limit
sep, limit, opts = false, sep, limit
end
if `sep.$$is_hash` && !limit && opts == {}
- 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 round
has a Cognitive Complexity of 35 (exceeds 5 allowed). Consider refactoring. Open
def round(ndigits = undefined)
if ::Integer === self
if `ndigits == null`
return self
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 tr
has 130 lines of code (exceeds 30 allowed). Consider refactoring. Open
def tr(from, to)
%x{
from = $coerce_to(from, #{::String}, 'to_str').$to_s();
to = $coerce_to(to, #{::String}, 'to_str').$to_s();