Showing 171 of 197 total issues
Avoid too many return
statements within this function. Open
Open
return results;
Avoid too many return
statements within this function. Open
Open
return sortInput ?
( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) :
0;
Avoid too many return
statements within this function. Open
Open
return root.ready !== undefined ?
root.ready( selector ) :
// Execute immediately if ready is not present
selector( jQuery );
Avoid too many return
statements within this function. Open
Open
return jQuery.makeArray( selector, this );
Avoid too many return
statements within this function. Open
Open
return JSON.parse( data );
Avoid too many return
statements within this function. Open
Open
return false;
Avoid too many return
statements within this function. Open
Open
if (stack[length] == a) return true;
Avoid too many return
statements within this function. Open
Open
return result;
Avoid too many return
statements within this function. Open
Open
if ('constructor' in a != 'constructor' in b || a.constructor != b.constructor) return false;
Avoid too many return
statements within this function. Open
Open
if (typeof a != 'object' || typeof b != 'object') return false;
Function __init__
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
Open
def __init__(self, action):
import graphviz
self.__graphviz_graph = graphviz.Digraph("action", node_attr={"shape": "box"})
nodes = {}
for (i, action) in enumerate(action.get_possible_execution_order()):
- 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"