Showing 177 of 209 total issues
Avoid deeply nested control flow statements. Open
Open
if ( node && node.value === id ) {
return [ elem ];
}
Avoid deeply nested control flow statements. Open
Open
if ( !(unmatched[i] || setMatched[i]) ) {
setMatched[i] = pop.call( results );
}
Avoid deeply nested control flow statements. Open
Open
if ( nid === expando ) {
context.removeAttribute( "id" );
}
Avoid deeply nested control flow statements. Open
Open
if (!allfound) {
continue;
}
Avoid deeply nested control flow statements. Open
Open
if ( ( ofType ?
node.nodeName.toLowerCase() === name :
node.nodeType === 1 ) &&
++diff ) {
Avoid deeply nested control flow statements. Open
Open
if ( Expr.relative[ tokens[j].type ] ) {
break;
}
Avoid deeply nested control flow statements. Open
Open
if ( hasScripts ) {
// Support: Android <=4.0 only, PhantomJS 1 only
// push.apply(_, arraylike) throws on ancient WebKit
jQuery.merge( scripts, getAll( node, "script" ) );
Avoid deeply nested control flow statements. Open
Open
if ( conv && s.throws ) {
response = conv( response );
} else {
try {
response = conv( response );
Function handler_broadcast_packet
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
Open
def handler_broadcast_packet(
self, host: Tuple[str, int], pkt_type: str, **kwargs
) -> None:
"""Exported function for pending broadcast pkt to specific peers.
This function is for anyother instance to make a safer packet send with
- 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
Consider simplifying this complex logical expression. Open
Open
if (terms[excluded[i]] == file ||
titleterms[excluded[i]] == file ||
$u.contains(terms[excluded[i]] || [], file) ||
$u.contains(titleterms[excluded[i]] || [], file)) {
valid = false;
Consider simplifying this complex logical expression. Open
Open
if ( matcher[ expando ] ) {
// Find the next relative operator (if any) for proper handling
j = ++i;
for ( ; j < len; j++ ) {
if ( Expr.relative[ tokens[j].type ] ) {
Consider simplifying this complex logical expression. Open
Open
if ( tokens.length > 2 && (token = tokens[0]).type === "ID" &&
context.nodeType === 9 && documentIsHTML && Expr.relative[ tokens[1].type ] ) {
context = ( Expr.find["ID"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0];
if ( !context ) {
Function condense
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
function condense( unmatched, map, filter, context, xml ) {
Function remove
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
remove: function( elem, types, handler, selector, mappedTypes ) {
Function augmentWidthOrHeight
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
function augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) {
Function Tween
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
function Tween( elem, options, prop, end, easing ) {
Function add
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
add: function( elem, types, handler, data, selector ) {
Function CHILD
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
"CHILD": function( type, what, argument, first, last ) {
Function superMatcher
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
superMatcher = function( seed, context, xml, results, outermost ) {
Function buildFragment
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
function buildFragment( elems, context, scripts, selection, ignored ) {