Showing 4,841 of 7,782 total issues

Avoid deeply nested control flow statements.
Open

                } else if ( copy !== undefined ) {
                    target[ name ] = copy;
                }
Severity: Major
Found in zk/src/main/resources/web/js/zk/ext/jquery.js - About 45 mins to fix

    Avoid deeply nested control flow statements.
    Open

                            if (!elem[zk.Widget._TARGETS]) {
                                elem[zk.Widget._TARGETS] = [w];
                            } else {
                                elem[zk.Widget._TARGETS].push(w);
                            }
    Severity: Major
    Found in zk/src/main/resources/web/js/zk/ext/jquery.js - About 45 mins to fix

      Avoid deeply nested control flow statements.
      Open

                              if (!elem) {
                                  // treechildren may not have the value from $n()
                                  elem = w.parent.$n();
                              }
      Severity: Major
      Found in zk/src/main/resources/web/js/zk/ext/jquery.js - About 45 mins to fix

        Avoid deeply nested control flow statements.
        Open

                                            while ((node = node[dir])) {
                                                if (ofType ?
                                                    node.nodeName.toLowerCase() === name :
                                                    node.nodeType === 1) {
        
        
        Severity: Major
        Found in zk/src/main/resources/web/js/zk/ext/jquery.js - About 45 mins to fix

          Avoid deeply nested control flow statements.
          Open

                              if ( Expr.relative[ tokens[ j ].type ] ) {
                                  break;
                              }
          Severity: Major
          Found in zk/src/main/resources/web/js/zk/ext/jquery.js - About 45 mins to fix

            Avoid deeply nested control flow statements.
            Open

                                    for ( match in context ) {
            
                                        // Properties of context are called as methods if possible
                                        if ( isFunction( this[ match ] ) ) {
                                            this[ match ]( context[ match ] );
            Severity: Major
            Found in zk/src/main/resources/web/js/zk/ext/jquery.js - About 45 mins to fix

              Avoid deeply nested control flow statements.
              Open

                                      if (param.typeAnnotation) {
                                          continue;
                                      }
              Severity: Major
              Found in eslint-plugin-zk/src/transform.js - About 45 mins to fix

                Avoid deeply nested control flow statements.
                Open

                                        do {
                                            if (id = data[j] && data[j]!.$u)
                                                data[j] = zk.Widget.$(id) as never;
                                        } while (j--);
                Severity: Major
                Found in zk/src/main/resources/web/js/zk/au.ts - About 45 mins to fix

                  Function _getTextSize has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                  Open

                  function _getTextSize(zkc: zk.JQZK, zkp: zk.JQZK, zkpOffset: zk.Offset): zk.Offset {
                      let $zkc = zkc.jq,
                          $prev = $zkc.prev(),
                          pos: zk.Offset = [0, 0],
                          coldVal: Record<string, string>,
                  Severity: Minor
                  Found in zk/src/main/resources/web/js/zk/flex.ts - About 45 mins to fix

                  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 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 },
                  Severity: Minor
                  Found in zk/src/main/resources/web/js/zk/au.ts - About 45 mins to fix

                  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 optgroup$mold$ has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                  Open

                  function optgroup$mold$(out) {
                      const visible = this.isVisible();
                      if (visible) out.push('<optgroup', this.domAttrs_(), '>');
                      for (let w = this.nextSibling; w; w = w.nextSibling) {
                          if ((w instanceof zul.sel.Optgroup))
                  Severity: Minor
                  Found in zul/src/main/resources/web/js/zul/sel/mold/optgroup.js - About 45 mins to fix

                  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 (!localeFamilies[config.parentLocale]) {
                                              localeFamilies[config.parentLocale] = [];
                                          }
                  Severity: Major
                  Found in zk/src/main/resources/web/js/zk/ext/moment.js - About 45 mins to fix

                    Avoid deeply nested control flow statements.
                    Open

                                                    if (zk.mounting) doCmdFns.push(fnPfDone);
                                                    else fnPfDone();
                    Severity: Major
                    Found in zk/src/main/resources/web/js/zk/au.ts - About 45 mins to fix

                      Function zkver has 6 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                          export function zkver(ver: string, build: string, ctxURI: string, updURI: string, modVers: Record<string, string>, opts: Record<string, unknown>): void {
                      Severity: Minor
                      Found in zk/src/main/resources/web/js/zk/mount.ts - About 45 mins to fix

                        Function mtBL1 has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                        Open

                        function mtBL1(): void {
                            if (_crInfBL0.length || _crInfBL1.length)
                                return; //another page started
                        
                            zk.booted = true;
                        Severity: Minor
                        Found in zk/src/main/resources/web/js/zk/mount.ts - About 45 mins to fix

                        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 (cc == '.' && j > ++k)
                                            sb = sb.substring(0, k) + sb.substring(j);
                        Severity: Major
                        Found in zk/src/main/resources/web/js/zk/fmt/numfmt.ts - About 45 mins to fix

                          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;
                          Severity: Minor
                          Found in zul/src/main/resources/web/js/zul/wgt/mold/groupbox.js - About 45 mins to fix

                          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 on has 6 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

                              on: function (this: JQuery, type: string, selector, data: unknown, fn: unknown, ...rest: unknown[]) {
                          Severity: Minor
                          Found in zk/src/main/resources/web/js/zk/domtouch.ts - About 45 mins to fix

                            Avoid deeply nested control flow statements.
                            Open

                                                        if (Object.hasOwn(content, key)) {
                                                            reqContent += (reqContent.length ? '&' : '') + key + '=' + encodeURIComponent(content[key] as string);
                                                        }
                            Severity: Major
                            Found in zk/src/main/resources/web/js/zk/au.ts - About 45 mins to fix

                              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?() }) {
                              Severity: Minor
                              Found in zk/src/main/resources/web/js/zk/au.ts - About 45 mins to fix

                              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

                              Severity
                              Category
                              Status
                              Source
                              Language