Showing 1,373 of 3,020 total issues
Function vec_vertical_sem
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def vec_vertical_sem(op, elt_size, reg_size, dst, src, apply_on_output):
Function ps_rl_ll
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def ps_rl_ll(ir, instr, dst, src, op, size):
Function fromstring
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def fromstring(self, text, loc_db, parser_result=None):
if parser_result:
expr, start, stop = parser_result[self.parser]
else:
try:
- 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 pinsr
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def pinsr(_, instr, dst, src, imm, size):
Avoid deeply nested control flow statements. Open
for rex_b in range(2):
for rex_x in range(2):
sib_rez[rex_x][rex_b][index][f_imm] = f_u32
elif sib_rez == sib_64_s08_ebp:
Avoid deeply nested control flow statements. Open
if int(disp) != sign_ext(int(value), admode, disp.size):
continue
else:
Avoid deeply nested control flow statements. Open
for rex_b in range(2):
for rex_x in range(2):
sib_rez[rex_x][rex_b][index][b + 8 * rex_b] = 1
sib_rez[rex_x][rex_b][index][f_imm] = f_u32
elif sib_rez == sib_u64:
Function opmode_prefix
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def opmode_prefix(mode):
size, opmode, admode = mode
if size in [16, 32]:
if opmode:
return invmode[size]
- 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
for rex_b in range(2):
for rex_x in range(2):
sib_rez[rex_x][rex_b][index][f_imm] = f_s08
sib_rez[rex_x][rex_b][index][ebp + 8 * rex_b] = 1
Avoid deeply nested control flow statements. Open
for rex_x in range(2):
tmp = i + 8 * rex_x
if i == 0b100 and rex_x == 0:
continue
if not tmp in sib_rez[rex_x][rex_b][index]:
Avoid deeply nested control flow statements. Open
for rex_b in range(2):
for rex_x in range(2):
sib_rez[rex_x][rex_b][index][f_imm] = f_u32
sib_rez[rex_x][rex_b][index][ebp + 8 * rex_b] = 1
elif sib_rez == sib_u64:
Avoid deeply nested control flow statements. Open
for rex_b in range(2):
for rex_x in range(2):
sib_rez[rex_x][rex_b][index][b + 8 * rex_b] = 1
elif sib_rez == sib_64_s08_ebp:
Function _roundscalar
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def _roundscalar(ir, inst, dst, src, imm8, double):
Avoid deeply nested control flow statements. Open
if int(disp) != int(value):
continue
else:
Avoid deeply nested control flow statements. Open
for rex_b in range(2):
for rex_x in range(2):
sib_rez[rex_x][rex_b][index][f_imm] = f_s08
sib_rez[rex_x][rex_b][index][b + 8 * rex_b] = 1
Function jmp
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def jmp(ir, instr, dst):
e = []
meip = mRIP[ir.IRDst.size]
if isinstance(dst, m2_expr.ExprOp):
- 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 pextr
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def pextr(_, instr, dst, src, imm, size):
Function punpck
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def punpck(_, instr, dst, src, size, off):
Function __init__
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def __init__(self, sex, wsize, *args, **kargs):
if sex == 1:
sex = '<'
else:
sex = '>'
- 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 __init__
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def __init__(self, loc_db, fname, options, custom_methods=None, **kwargs):
"""
Initialize a sandbox
@fname: str file name
@options: namespace instance of specific options
- 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"