Showing 1,321 of 1,541 total issues
Avoid too many return
statements within this method. Open
return @tuple.at(@start + start_idx)
Avoid too many return
statements within this method. Open
return new_range(0, 0) if start_idx == @total
Avoid too many return
statements within this method. Open
return nil if start_idx < 0
Avoid too many return
statements within this method. Open
return false
Avoid too many return
statements within this method. Open
return nil
Avoid too many return
statements within this method. Open
return self[idx.to_sym]
Avoid too many return
statements within this method. Open
return 1
Avoid too many return
statements within this method. Open
return @source.byteslice(x, y-x)
Avoid too many return
statements within this method. Open
return false unless self_tuple[self_idx] == other_tuple[other_idx]
Avoid too many return
statements within this method. Open
return nil
Avoid too many return
statements within this method. Open
return count == size ? result : result[0, count]
Avoid too many return
statements within this method. Open
return to_a[idx]
Avoid too many return
statements within this method. Open
return result
Avoid too many return
statements within this method. Open
return val if val
Avoid too many return
statements within this method. Open
return find_object([:kind_of, what], block)
Avoid too many return
statements within this method. Open
return [at(i), at(j)]
Avoid too many return
statements within this method. Open
return nil
Method gem_requires
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def gem_requires name, options # :nodoc:
if options.include? :require then
if requires = options.delete(:require) then
@requires[name].concat Array requires
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 each
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def each
return enum_for unless block_given?
action = @first_action
loop do
break unless action
- 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 reverse_each
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def reverse_each
return enum_for(:reverse_each) unless block_given?
action = @current_action
loop do
break unless action
- 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"