Method update_calls
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
def update_calls
@project.each_sub_nodes(Hiptest::Nodes::Scenario, Hiptest::Nodes::Actionword, Hiptest::Nodes::Test, Hiptest::Nodes::Folder) do |item|
@last_annotation = nil
item.each_sub_nodes(Hiptest::Nodes::Call) do |call|
set_call_chunks(call)
- 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 set_call_chunks
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
def set_call_chunks(call)
all_arguments = all_valued_arguments_for(call)
inline_parameter_names = []
extra_inlined_arguments = []
Method set_actionwords_chunks
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
def set_actionwords_chunks(actionword)
name = actionword.uniq_name
actionword_parameters = evaluated_map(actionword.children[:parameters])
name_chunks = name.split("\"", -1)
inline_parameter_names = []
Method evaluate
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def evaluate(value)
if value.nil?
nil
elsif Hiptest::Nodes::Variable === value
"<#{value.children[:name]}>"
- 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 set_call_chunks
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def set_call_chunks(call)
all_arguments = all_valued_arguments_for(call)
inline_parameter_names = []
extra_inlined_arguments = []
- 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"