Showing 6 of 64 total issues
Avoid deeply nested control flow statements. Open
Open
if c.tag == "ARG_ADDRESS":
address = c.text
Avoid deeply nested control flow statements. Open
Open
for kk in range(0, int(t[y+3].value[1:-1])):
file2.write("recursive_fuzz(STRUCT_" + t[y+1].value + ", &p" + str(k) + "->" + t[y+2].value + "[" + str(kk) + "]);\n")
Avoid deeply nested control flow statements. Open
Open
if "STRUCT_" in c.tag:
if c.text == "unmapped":
f.write("void *arg_" + str(child_id) + "= (void *) " + address + "; //unmapped \n")
continue
Consider simplifying this complex logical expression. Open
Open
if t[y].type == "NAME" and t[y+1].type == "NAME" and t[y+2].type == "END":
if isPrimitive(t[y].value):
file2.write("//%s is primitive\n" % (t[y+1].value))
#print("%s is primitive\n" % (t[y+1]))
Function go
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
Open
def go(query, path):
"""Download full size images from Google image search.
Don't print or republish images without permission.
I used this to train a learning algorithm.
- 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 create_minset
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
Open
def create_minset(hook_list):
coverage = []
minset = []
global average_libxiv_len
for h in hook_list:
- 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"