Showing 7,775 of 7,775 total issues
Avoid deeply nested control flow statements. Open
if (jq(p).css('position') == 'absolute') {
isAbsolute = true;
break;
}
Avoid deeply nested control flow statements. Open
if (!jq('#zk_proc').length) //B65-ZK-1431: check if progressbox exists
zUtl.progressbox('zk_proc', window.msgzk ? msgzk.PLEASE_WAIT : 'Processing...', true);
Avoid deeply nested control flow statements. Open
if (_afterKD(w, wevt))
return;
Function isChar
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
static isChar(cc: string, opts: Partial<IsCharOptions>): boolean {
return !!((opts.digit && cc >= '0' && cc <= '9')
|| (opts.upper && cc >= 'A' && cc <= 'Z')
|| (opts.lower && cc >= 'a' && cc <= 'z')
|| (opts.whitespace && (cc == ' ' || cc == '\t' || cc == '\n' || cc == '\r'))
- 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 (newY < 100 && newY === (y + ydelta) % 100) break; // assume yy is not modified
Function _createWrapper
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
_createWrapper(element: JQuery): JQuery {
// ZK-5354: Update animation implementation to avoid iframe reloading
if (element.find('iframe').length) {
return element;
}
- 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 (txt.trim().length) {
const w = new zk.Native();
w.prolog = txt;
wgt.appendChild(w);
} else if (wgt.blankPreserved)
Avoid deeply nested control flow statements. Open
for (var index = symbols.length, brkswch; --index >= 0;) {
var monStr = symbols[index].toLowerCase();
if ((nonLenient && mon == monStr) || (!nonLenient && mon.startsWith(monStr))) {
var monStrLen = monStr.length;
Avoid deeply nested control flow statements. Open
if (ary.length) {
ts.push(ary.join(''));
ary = [];
}
Avoid deeply nested control flow statements. Open
if (len < 3) len = 2;
Avoid deeply nested control flow statements. Open
if (fmt.charAt(k) == 'r') k++; // ZK-2964: for nl local uur
Function parseDate
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
parseDate(
txt: string,
fmt: string,
strict?: boolean,
refval?: DateImpl,
- 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 (isNaN(nv = _parseInt(token)))
return; // failed, B50-3314513
Function constructor
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
constructor(widget: zk.Widget, currentTarget: object) {
super(); // FIXME: params?
this.$view = widget;
this.$currentTarget = currentTarget;
this._aftercmd = {};
- 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 (nosep)
token = _parseToken(token, ts, --i, token.length);//token.length: the length of French month is 4
Avoid deeply nested control flow statements. Open
if (!eraName) return; // no era match
Function _doAnique
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
function _doAnique(id: string): void {
var ary = zk._anique[id];
if (ary) {
var al = ary.length, data: Anima | undefined;
while (data = ary.shift()) {
- 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 (s2) s = s2 + s.substring(j);
Avoid deeply nested control flow statements. Open
if (brkswch)
break;
Avoid deeply nested control flow statements. Open
if (d < 0 || d > 31) //restrict since user might input year for day (ok to allow 0 and 31 for easy entry)
return; //failed