Showing 4,835 of 7,777 total issues
Function setSelectionRange
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
setSelectionRange(start: number, end?: number): this {
var inp = this.jq[0] as HTMLInputElement,
len = inp.value ? inp.value.length : 0; //ZK-2805
if (start == null || start < 0) start = 0;
if (start > len) start = len;
- 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 _tapHoldStart
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
_tapHoldStart(evt: JQuery.TouchEventBase) {
var tevt = evt.originalEvent as TouchEvent;
if (tevt.touches.length > 1)
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 setHours
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
setHours(hr: number, min?: number, sec?: number, msec?: number): number {
var mt = this._getTzMoment();
mt.hour(hr);
if (min != null) {
mt.minute(min);
- 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 $doAfterCommand
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
$doAfterCommand(cmd: string, args?: unknown[]): void {
var ac = this._aftercmd![cmd],
tduac = this._toDoUnAftercmd[cmd];
this._processingAfterCommand = true; // ZK-4482
for (var i = 0, j = ac ? ac.length : 0; i < j; i++)
- 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 _dragMove
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
_dragMove(evt: JQuery.DragEvent<never, {orient: string; point: number; pos: number}>): void {
var data = evt.data,
orient = data.orient,
point = data.point,
pos = data.pos,
- 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 formatDate
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
formatDate(val: DateImpl, fmt?: string, localizedSymbols?: zk.LocalizedSymbols): string {
var d: LeapDay | undefined;
if (localizedSymbols) {
var localeDateTimeFormat = new Intl.DateTimeFormat(localizedSymbols.LAN_TAG, { year: 'numeric' });
this._offset = localizedSymbols.YDELTA || zk.fmt.Date.getYDelta(val._moment.toDate(), localeDateTimeFormat);
- 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 _mouseOver
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
_mouseOver(evt: zk.Event): void {
var cls = evt.target.className,
index = cls.lastIndexOf('-'),
key = cls.substring(index + 1),
$drag = jq(this.edrag);
- 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 globalCommand
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
globalCommand(cmd: string, args?: Record<string, unknown>, opts?: zk.EventOptions, timeout?: number): this {
var wgt = this.$view;
if (opts) {
if (opts.duplicateIgnore)
_fixCommandName('onBindGlobalCommand$', cmd, opts, 'duplicateIgnore');
- 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 $binder
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
$binder(): zkbind.Binder | undefined {
// eslint-disable-next-line @typescript-eslint/no-this-alias
var w: zk.Widget | undefined = this;
for (; w; w = w.parent) {
if (w.$ZKBINDER$)
- 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 _mousewheelX
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
_mousewheelX(evt: zk.Event, delta: number, deltaX: number, deltaY: number): void {
var opts = this.opts,
step = opts.step * opts.wheelAmountStep,
pos = this._pos![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
Function isAncestor
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
static isAncestor(p?: zk.Widget, c?: zk.Widget & {getParent?(): zk.Widget}): boolean {
if (!p) return true;
for (; c; c = c.getParent ? c.getParent() : c.parent)
if (p == c)
return true;
- 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 _showScrollbar
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function _showScrollbar(wgt: Scrollbar, orient: string, opacity: number): void {
var isHide = opacity == 0,
bar = wgt.$n(orient),
embed = wgt.$n(orient + '-embed'),
style: CSSStyleDeclaration;
- 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 scrollOffset
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
scrollOffset(): zk.Offset {
//Fix opera bug (see the page function)
// If tag is "img" or "tr", the "div" element's scrollTop should be ignored.
// Because the offsetTop of element "img" or "tr" is excluded its scrollTop.
var node = this.jq![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
Function command
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
command(cmd: string, args?: Record<string, unknown>, opts?: zk.EventOptions, timeout?: number): this {
var wgt = this.$view;
if (opts) {
if (opts.duplicateIgnore)
_fixCommandName('onBindCommand$', cmd, opts, 'duplicateIgnore');
- 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 create
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
create(context) {
const sourceCode = context.getSourceCode();
function checkAccessModifier(node: ClassMember): void {
// Knowing that `node.accessibility` is not enough; must check with
// `isValidAccessModifier`.
- 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"