Showing 254 of 254 total issues
Avoid deeply nested control flow statements. 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
access: function( elems, key, value, exec, fn, pass ) {
Avoid deeply nested control flow statements. Open
} else if ( copy !== undefined ) {
target[ name ] = copy;
}
Function log
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. 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
function dirNodeCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) {
Avoid deeply nested control flow statements. Open
if ( elem.id !== match[2] ) {
return rootjQuery.find( selector );
}
Avoid deeply nested control flow statements. Open
if ( ! CSSCompressor.objectsMatch( a[ i ], b[ i ] ) ) {
return false;
}
Function CLASS
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
CLASS: function( match, curLoop, inplace, result, not, isXML ) {
Avoid deeply nested control flow statements. Open
if ( !inplace ) {
curLoop = result;
}
Avoid deeply nested control flow statements. Open
if ( !anyFound ) {
return [];
}
Avoid deeply nested control flow statements. Open
if ( match.jquery ? match.index(cur) > -1 : jQuery(cur).is(match) ) {
ret.push({ selector: selector, elem: cur, level: level });
}
Avoid deeply nested control flow statements. Open
if ( option.selected && (jQuery.support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null) &&
(!option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" )) ) {
// Get the specific value for the option
value = jQuery(option).val();
Avoid deeply nested control flow statements. Open
if ( ralpha.exec( line = line.replace( rcomkey, '' ) ) ) {
html += line;
}
Avoid deeply nested control flow statements. Open
else if ( line.trim().indexOf( '*/' ) === 0 ) {
comexit = true;
}
Avoid deeply nested control flow statements. Open
if ( !isXML ) {
elem.sizcache = doneName;
elem.sizset = i;
}
Function callback
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
callback: function( branch, compressor ) {
if ( ! branch.rules || ! branch.rules.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 callback
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
callback: function( branch, compressor ) {
if ( ! branch.rules || ! branch.rules.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
Avoid deeply nested control flow statements. Open
if ( rule.parts.length == 2 ) {
separator = true;
sections[ 0 ][ 1 ] = rule.parts[ 0 ];
sections[ 1 ][ 1 ] = rule.parts[ 1 ];
}
Avoid deeply nested control flow statements. Open
else if ( rule.property == graph.bottomright ) {
if ( rule.parts.length == 2 ) {
separator = true;
sections[ 0 ][ 2 ] = rule.parts[ 0 ];
sections[ 1 ][ 2 ] = rule.parts[ 1 ];
Avoid deeply nested control flow statements. Open
if ( j !== 0 && i !== 0 ) {
compressor.log(
"Promoting nested ID to selector front",
branch.position
);