Showing 1,373 of 3,020 total issues
Function umlal
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def umlal(ir, instr, a, b, c, d):
Function encode
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def encode(self):
e = self.expr
if e in self.reg_info.expr:
self.parent.a_d.value = 0
self.value = self.reg_info.expr.index(e)
- 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 value
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def value(self, mode):
"""Adjust the assembled instruction based on the endianness
Note: code inspired by miasm/arch/mips32/arch.py
"""
- 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 smull
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def smull(ir, instr, a, b, c, d):
Function smlabt
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def smlabt(ir, instr, a, b, c, d):
Function decode
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def decode(self, v):
if hasattr(self.parent, 'size'):
size = [16, 8][self.parent.size.value]
else:
size = 16
- 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 mla
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def mla(ir, instr, a, b, c, d):
Function mls
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def mls(ir, instr, a, b, c, d):
Function smlal
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def smlal(ir, instr, a, b, c, d):
Function ubfx
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def ubfx(ir, instr, a, b, c, d):
Function smlatb
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def smlatb(ir, instr, a, b, c, d):
Function umull
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def umull(ir, instr, a, b, c, d):
Function gen_cmov
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def gen_cmov(ir, instr, cond, dst, src, mov_if):
Function decode
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def decode(self, v):
v = v & self.lmask
out = []
for i in range(0x10):
if 1 << i & v:
- 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 decode
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def decode(self, v):
val = v & self.lmask
val = self.decodeval(val)
if val is False:
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 _rotate_tpl
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def _rotate_tpl(ir, instr, dst, src, op, left=False):
Function decode
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def decode(self, v):
v = v & self.lmask
out = []
for i in range(13):
if 1 << i & v:
- 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 ins
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def ins(ir, instr, a, b, c, d):
Function arg2str
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def arg2str(expr, index=None, loc_db=None):
if expr.is_id() or expr.is_int():
return str(expr)
elif expr.is_loc():
if loc_db 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 gen_fcmov
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def gen_fcmov(ir, instr, cond, arg1, arg2, mov_if):