Showing 333 of 491 total issues
Avoid too many return
statements within this method. Open
return send_data(buf)
Avoid too many return
statements within this method. Open
return send_data("CLIENT_ERROR storage[#{dn}] status can't changed\r\n")
Avoid too many return
statements within this method. Open
return send_data("CLIENT_ERROR storage[#{dn}] != :safecopy_flushed status\r\n")
Avoid too many return
statements within this method. Open
return send_data("CLIENT_ERROR storage[#{dn}] status can't changed\r\n")
Avoid too many return
statements within this method. Open
return send_data("NOT_FOUND\r\n") unless res[4]
Avoid too many return
statements within this method. Open
return send_data("NOT_DELETED\r\n") unless res
Avoid too many return
statements within this method. Open
return send_data(buf)
Avoid too many return
statements within this method. Open
return send_data("NOT_FOUND\r\n") unless res[4]
Avoid too many return
statements within this method. Open
return true
Avoid too many return
statements within this method. Open
return true
Avoid too many return
statements within this method. Open
return false
Avoid too many return
statements within this method. Open
return true
Method ev_rset_log_shift_age
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def ev_rset_log_shift_age(s)
if s.length != 2
return send_data("CLIENT_ERROR number of arguments\r\n")
elsif s[1].to_i < 1 && !['0', 'min', 'hour', 'daily', 'weekly', 'monthly'].include?(s[1])
return send_data("CLIENT_ERROR invalid arguments\r\n")
- 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 ev_alist_include?
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def ev_alist_include?(s)
hname, k, d, vn, nodes = calc_hash(s[1])
data = read_bytes(s[2].to_i)
read_bytes(2)
return forward2(nodes[0], s, data) if nodes[0] != @nid
- 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 ev_alist_length
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def ev_alist_length(s)
hname, k, d, vn, nodes = calc_hash(s[1])
return forward2(nodes[0], s) if nodes[0] != @nid
ddata = @storages[hname].get(vn, k, d)
@stats.read_count += 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 ev_set_log_shift_age
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def ev_set_log_shift_age(s)
if s.length != 2
return send_data("CLIENT_ERROR number of arguments\r\n")
elsif s[1].to_i < 1 && !['0', 'min', 'hour', 'daily', 'weekly', 'monthly'].include?(s[1])
return send_data("CLIENT_ERROR invalid arguments\r\n")
- 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 ev_reqpushv
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def ev_reqpushv(s)
if s.length!=4
send_data("CLIENT_ERROR usage:reqpushv vnode-id node-id primary-flag(true/false)\r\n")
return
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 ev_alist_empty?
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def ev_alist_empty?(s)
hname, k, d, vn, nodes = calc_hash(s[1])
return forward2(nodes[0], s) if nodes[0] != @nid
ddata = @storages[hname].get(vn, k, d)
- 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 ev_rset
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def ev_rset(s)
key,hname = s[1].split("\e")
hname ||= @defhash
d = s[2].to_i
d = Digest::SHA1.hexdigest(key).hex % @rttable.hbits if d == 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 ev_fget
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def ev_fget(s)
key,hname = s[1].split("\e")
hname ||= @defhash
d = Digest::SHA1.hexdigest(key).hex % @rttable.hbits
vn = @rttable.get_vnode_id(d)
- 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"