Showing 7,775 of 7,775 total issues
Avoid deeply nested control flow statements. Open
if ( conv && s.throws ) {
response = conv( response );
} else {
try {
response = conv( response );
Avoid deeply nested control flow statements. Open
if (!elem[zk.Widget._TARGETS]) {
elem[zk.Widget._TARGETS] = [w];
} else {
elem[zk.Widget._TARGETS].push(w);
}
Avoid deeply nested control flow statements. Open
if ( skip && skip === elem.nodeName.toLowerCase() ) {
elem = elem[ dir ] || elem;
} else if ( ( oldCache = uniqueCache[ key ] ) &&
oldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) {
Avoid deeply nested control flow statements. Open
if (cur[zk.Widget._CURRENT_TARGET]) {
cur[zk.Widget._TARGET] = cur[zk.Widget._CURRENT_TARGET];
delete cur[zk.Widget._CURRENT_TARGET];
}
Avoid deeply nested control flow statements. Open
for ( type in data.events ) {
if ( special[ type ] ) {
jQuery.event.remove( elem, type );
// This is a shortcut to avoid jQuery.event.remove's overhead
Avoid deeply nested control flow statements. Open
if ( newContext !== context || !support.scope ) {
// Capture the context ID, setting it first if necessary
if ( ( nid = context.getAttribute( "id" ) ) ) {
nid = nid.replace( rcssescape, fcssescape );
Avoid deeply nested control flow statements. Open
while ((node = node[dir])) {
if (node.widgetName === name) {
return false;
}
}
Avoid deeply nested control flow statements. Open
for ( conv2 in converters ) {
// If conv2 outputs current
tmp = conv2.split( " " );
if ( tmp[ 1 ] === current ) {
Avoid deeply nested control flow statements. Open
if (!elem) {
// treechildren may not have the value from $n()
elem = w.parent.$n();
}
Avoid deeply nested control flow statements. Open
if (node.nodeType === 1 && ++diff && node === elem) {
uniqueCache[type] = [dirruns, nodeIndex, diff];
break;
}
Avoid deeply nested control flow statements. Open
if ( ( elem = matcherOut[ i ] ) ) {
// Restore matcherIn since elem is not yet a final match
temp.push( ( matcherIn[ i ] = elem ) );
}
Avoid deeply nested control flow statements. Open
if ( !( unmatched[ i ] || setMatched[ i ] ) ) {
setMatched[ i ] = pop.call( results );
}
Function exports
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
module.exports = function ({types: t}) {
function createNestedMemberExpression(identifiers) {
if (identifiers.length === 1) {
return t.identifier(identifiers[0]);
- 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 (hasOwnProp(arguments[0], key)) {
arg += key + ': ' + arguments[0][key] + ', ';
}
Function groupbox$mold$
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
function groupbox$mold$(out, skipper) {
var uuid = this.uuid,
cap = this.caption,
title = this.getTitle();
title = title && !cap ? zUtl.encodeXML(title) : 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
Avoid deeply nested control flow statements. Open
if (param.typeAnnotation) {
continue;
}
Function ajaxSendNow
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
function ajaxSendNow(reqInf: AuRequestInfo): void {
var fetchOpts: RequestInit = {
credentials: 'same-origin',
method: 'POST',
headers: reqInf.content instanceof FormData ? { 'ZK-SID': '' + reqInf.sid } : { 'Content-Type': zAu.ajaxSettings.contentType, 'ZK-SID': '' + reqInf.sid },
- 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 (Object.hasOwn(content, key)) {
reqContent += (reqContent.length ? '&' : '') + key + '=' + encodeURIComponent(content[key] as string);
}
Avoid deeply nested control flow statements. Open
if (zk.mounting) doCmdFns.push(fnPfDone);
else fnPfDone();
Function clearWrongValue
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
export function clearWrongValue(...args: string[]): void {
for (var i = args.length; i--;) {
var wgt = zk.Widget.$(args[i]);
if (wgt) {
var toClearErrMsg = function (w: zk.Widget & { clearErrorMessage?() }) {
- 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"