Method tsequence
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
def tsequence(table_defs, offset = 0)
instructions = []
buffer = []
last = 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 sequence
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
def sequence(segment_uses, offset = 0)
instructions = []
buffer = []
last = 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 lsequence
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
def lsequence(loop_defs, offset = 0)
instructions = []
buffer = []
last = 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 tsequence
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
def tsequence(table_defs, offset = 0)
instructions = []
buffer = []
last = nil
Method mksimple
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
def mksimple(designator, element_use, element_tok)
# We don't validate that element_tok is simple because the TokenReader
# will always produce a SimpleElementTok given a SimpleElementUse from
# the SegmentDef. On the other hand, the BuilderDsl API will throw an
# exception if the programmer constructs the wrong kind of element
- 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 lsequence
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
def lsequence(loop_defs, offset = 0)
instructions = []
buffer = []
last = nil
Method sequence
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
def sequence(segment_uses, offset = 0)
instructions = []
buffer = []
last = nil
Method mksegment
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def mksegment(segment_tok, segment_use)
segment_def = segment_use.definition
element_uses = segment_def.element_uses
element_toks = segment_tok.element_toks
- 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 mkelement
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def mkelement(designator, element_use, element_tok)
if element_use.simple?
if element_use.repeatable?
element_toks = element_tok.element_toks
element_vals = element_toks.map do |element_tok1|
- 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"