Showing 1,373 of 3,020 total issues
Function del_mem_above_stack
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def del_mem_above_stack(self, stack_ptr):
"""
Remove all stored memory values with following properties:
* pointer based on initial stack value
* pointer below current stack pointer
- 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
Function intra_block_flow_symb
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def intra_block_flow_symb(lifter, _, flow_graph, irblock, in_nodes, out_nodes):
Function prepare_loader_arml
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def prepare_loader_arml(jitter, argv, envp, auxv, linux_env,
Function simp_test_signext_inf
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def simp_test_signext_inf(expr_s, expr):
"""A.signExt() <s int => A <s int[:]"""
if not (expr.is_op(TOK_INF_SIGNED) or expr.is_op(TOK_INF_EQUAL_SIGNED)):
return expr
arg, cst = expr.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
Function visit_inner
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def visit_inner(self, expr, *args, **kwargs):
self.get_r_leaves(expr)
if expr.is_mem() and not self.mem_read:
# Don't visit memory sons
return None
- 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
Avoid deeply nested control flow statements. Open
if is_signed:
out = -1
else:
out = 0
else:
Function csneg
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def csneg(ir, instr, arg1, arg2, arg3, arg4):
Function ubfm
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def ubfm(ir, instr, arg1, arg2, arg3, arg4):
Function ccmp
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def ccmp(ir, instr, arg1, arg2, arg3, arg4):
Function bfm
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def bfm(ir, instr, arg1, arg2, arg3, arg4):
Function fmadd
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def fmadd(ir, instr, arg1, arg2, arg3, arg4):
Function csinc
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def csinc(ir, instr, arg1, arg2, arg3, arg4):
Function __getitem__
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def __getitem__(self, info):
if isinstance(info, slice):
start = info.start if info.start else 0
stop = info.stop if info.stop else self.value
if info.step is not None:
- 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
Function fmsub
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def fmsub(ir, instr, arg1, arg2, arg3, arg4):
Function sbfm
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def sbfm(ir, instr, arg1, arg2, arg3, arg4):
Function csinv
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def csinv(ir, instr, arg1, arg2, arg3, arg4):
Function encode
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def encode(self):
if not isinstance(self.expr, m2_expr.ExprInt):
return False
if not test_set_sf(self.parent, self.expr.size):
return 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
Function mlas
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def mlas(ir, instr, a, b, c, d):
Function smlabb
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def smlabb(ir, instr, a, b, c, d):
Function smlatt
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def smlatt(ir, instr, a, b, c, d):