Showing 806 of 967 total issues
Method stage
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def stage
if @_stage.nil?
@_stage = "normal"
arg_count = Builtins.size(WFM.Args)
- 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 perform_action
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def perform_action
return true unless action
result = send("perform_#{action}")
register_error(:active) if result == 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 CheckNetwork6
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def CheckNetwork6(network)
generic_check = CheckNetworkShared(network)
return generic_check unless generic_check.nil?
# 2001:db8:0::1/64
- 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 CheckNetwork4
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def CheckNetwork4(network)
generic_check = CheckNetworkShared(network)
return generic_check unless generic_check.nil?
# 192.168.0.0/20, 0.8.55/158
- 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 MakeParamsFromMap
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def MakeParamsFromMap(params_map)
params_map = deep_copy(params_map)
# ["key1=value1", "key2=value2", ...] -> "key1=value1&key2=value2"
Builtins.mergestring(
# ["key" : "value", ...] -> ["key=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 MakeMapFromParams
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def MakeMapFromParams(params)
# Error
if params.nil?
Builtins.y2error("Erroneous (nil) params!")
return 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"