Showing 4,841 of 7,782 total issues
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 (s2) s = s2 + s.substring(j);
Avoid deeply nested control flow statements. Open
if (ary.length) {
ts.push(ary.join(''));
ary = [];
}
Avoid deeply nested control flow statements. Open
if (newY < 100 && newY === (y + ydelta) % 100) break; // assume yy is not modified
Avoid deeply nested control flow statements. Open
if (cc == 'm') min = nv;
else if (cc == 's') sec = nv;
else msec = nv;
Avoid deeply nested control flow statements. Open
if (len < 3) len = 2;
Avoid deeply nested control flow statements. Open
if (token && token.length > len) {
ts[--i] = token.substring(len);
token = token.substring(0, len);
}
Function getRuleNames
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
getRuleNames: function (func: TSESTree.Node): string[] {
// Unwrap the possible call expression.
if (func.type === 'CallExpression')
func = func.callee;
- 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 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 (len == 3)
symbols = localizedSymbols.SMON!;
else if (len == 4)
symbols = localizedSymbols.FMON!;
else
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
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 (ydelta === 0 && newY < 100) { // only handle twoDigitYearStart with ISO calendar for now
// ZK-4235: Datefmt parseDate always return date between 1930-2029 when using yy format
var twoDigitYearStart = zk.TDYS,
lowerBoundary = (Math.floor(twoDigitYearStart / 100) * 100) + newY,
upperBoundary = lowerBoundary + 100;
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
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 (txt.trim().length) {
const w = new zk.Native();
w.prolog = txt;
wgt.appendChild(w);
} else if (wgt.blankPreserved)
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 (isNaN(nv = _parseInt(token)))
return; // failed, B50-3314513
Avoid deeply nested control flow statements. Open
} else if (len <= 2) {
if (nosep && token && token.length > 2) {//Bug 2560497 : if no separator, token must be assigned.
ts[--i] = token.substring(2);
token = token.substring(0, 2);
}