Showing 179 of 254 total issues
Avoid deeply nested control flow statements. Open
Open
if ( jQuery.isPlainObject( context ) ) {
selector = [ document.createElement( ret[1] ) ];
jQuery.fn.attr.call( selector, context, true );
} else {
Avoid deeply nested control flow statements. Open
Open
if ( ret === false ) {
event.preventDefault();
event.stopPropagation();
}
Function callback
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
Open
callback: function( branch, compressor ) {
if ( ! branch.selector || ! branch.parts || ! branch.parts.length ) {
return;
}
- 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 ATTR
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
ATTR: function( match, curLoop, inplace, result, not, isXML ) {
Avoid deeply nested control flow statements. Open
Open
else if ( m = rcomkey.exec( line ) ) {
seek = m[ 1 ];
html = '';
if ( ralpha.exec( line = line.replace( rcomkey, '' ) ) ) {
Avoid deeply nested control flow statements. Open
Open
if ( typeof cur !== "string" ) {
if ( elem === cur ) {
match = true;
break;
}
Avoid deeply nested control flow statements. Open
Open
if ( copyIsArray ) {
copyIsArray = false;
clone = src && jQuery.isArray(src) ? src : [];
} else {
Avoid deeply nested control flow statements. Open
Open
for ( var c = 0, cl = classNames.length; c < cl; c++ ) {
if ( className.indexOf( " " + classNames[c] + " " ) < 0 ) {
setClass += " " + classNames[c];
}
}
Avoid deeply nested control flow statements. Open
Open
if ( special.remove ) {
special.remove.call( elem, handleObj );
}
Avoid deeply nested control flow statements. Open
Open
if ( !match ) {
anyFound = found = true;
} else if ( match === true ) {
continue;
Function dirCheck
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
function dirCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) {
Avoid deeply nested control flow statements. Open
Open
if ( pos == null ) {
eventType.splice( j--, 1 );
}
Avoid deeply nested control flow statements. Open
Open
if ( jQuery.nodeName( tbody[ j ], "tbody" ) && !tbody[ j ].childNodes.length ) {
tbody[ j ].parentNode.removeChild( tbody[ j ] );
}
Avoid deeply nested control flow statements. Open
Open
else if ( a[ i ] !== b[ i ] ) {
return false;
}
Avoid deeply nested control flow statements. Open
Open
for ( var c = 0, cl = classNames.length; c < cl; c++ ) {
className = className.replace(" " + classNames[c] + " ", " ");
}
Avoid deeply nested control flow statements. Open
Open
for ( var i = 0; (item = curLoop[i]) != null; i++ ) {
if ( item ) {
found = filter( item, match, i, curLoop );
var pass = not ^ !!found;
Function access
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
access: function( elems, key, value, exec, fn, pass ) {
Avoid deeply nested control flow statements. Open
Open
} else if ( copy !== undefined ) {
target[ name ] = copy;
}
Function log
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
Open
log: function( key, message, positions ) {
var self = this;
// Empty call to log function returns all logs
if ( key === undefined ) {
- 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 dirNodeCheck
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
function dirNodeCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) {