Showing 5,781 of 10,536 total issues

Avoid deeply nested control flow statements.
Open

                        if (calendar[row][col].isSame(this.endDate)) { cname += ' end-date '; }
Severity: Major
Found in myems-admin/js/plugins/daterangepicker/daterangepicker.js - About 45 mins to fix

    Avoid deeply nested control flow statements.
    Open

                            for (var key in styleCache) {
                                if (hasOwnProperty.call(styleCache, key)) {
    
                                    var positions = styleCache[key].positions;
    
    
    Severity: Major
    Found in myems-admin/js/plugins/flot/jquery.flot.js - About 45 mins to fix

      Avoid deeply nested control flow statements.
      Open

                              if (calendar[row][col].isSame(this.startDate)) { cname += ' start-date '; }
      Severity: Major
      Found in myems-admin/js/plugins/daterangepicker/daterangepicker.js - About 45 mins to fix

        Avoid deeply nested control flow statements.
        Open

                                        if (angular.isDefined(provider)) {
                                            provider[args[1]].apply(provider, args[2]);
                                        }
        Severity: Major
        Found in myems-admin/js/plugins/oclazyload/ocLazyLoad.js - About 45 mins to fix

          Avoid deeply nested control flow statements.
          Open

                                      if (f) {
                                          if (f.number && val != null) {
                                              val = +val; // convert to number
                                              if (isNaN(val))
                                                  val = null;
          Severity: Major
          Found in myems-admin/js/plugins/flot/jquery.flot.js - About 45 mins to fix

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

            jvm.VMLCircleElement.prototype.applyAttr = function(attr, value){
              switch (attr) {
                case 'r':
                  this.node.style.width = value*2+'px';
                  this.node.style.height = value*2+'px';
            Severity: Minor
            Found in myems-admin/js/plugins/jvectormap/jquery-jvectormap-2.0.2.min.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 (typeof bbox == 'undefined') {
                          bbox = itemBbox;
                        } else {
                          newBbox = {
                            x: Math.min(bbox.x, itemBbox.x),
            Severity: Major
            Found in myems-admin/js/plugins/jvectormap/jquery-jvectormap-2.0.2.min.js - About 45 mins to fix

              Avoid deeply nested control flow statements.
              Open

                                          if (results_group != null) {
                                              results_group.group_match = true;
                                          }
              Severity: Major
              Found in myems-admin/js/plugins/chosen/chosen.jquery.js - About 45 mins to fix

                Avoid deeply nested control flow statements.
                Open

                                            if (searchText.length) {
                                                startpos = option.search_text.search(zregex);
                                                text = option.search_text.substr(0, startpos + searchText.length) + '</em>' + option.search_text.substr(startpos + searchText.length);
                                                option.search_text = text.substr(0, startpos) + '<em>' + text.substr(startpos);
                                            }
                Severity: Major
                Found in myems-admin/js/plugins/chosen/chosen.jquery.js - About 45 mins to fix

                  Avoid deeply nested control flow statements.
                  Open

                                  if (u) {
                                    var l = a && (a.shiftKey || a.ctrlKey || a.metaKey) ? !0 : !1;
                                    u = !0;
                                    "multi-extended" === b.options.selectionMode &&
                                      (u = !b.isObjInSelList(h) || !l || D || (a && a.shiftKey));
                  Severity: Major
                  Found in myems-admin/js/jcui/angular.integralui.treeview.min.js - About 45 mins to fix

                    Avoid deeply nested control flow statements.
                    Open

                                        for (f = 0; f < e.length; f++) ob(e[f], c, g, d);
                    Severity: Major
                    Found in myems-admin/js/jcui/angular.integralui.treeview.min.js - About 45 mins to fix

                      Avoid deeply nested control flow statements.
                      Open

                                          if (0 <= b.indexOf(k)) {
                                            h = !0;
                                            break;
                                          }
                      Severity: Major
                      Found in myems-admin/js/jcui/angular.integralui.treeview.min.js - About 45 mins to fix

                        Avoid deeply nested control flow statements.
                        Open

                                                  if (e) {
                                                    a.scrollTo(e);
                                                    a.itemSelection(g, e);
                                                    k.$apply();
                                                    var E = q(function() {
                        Severity: Major
                        Found in myems-admin/js/jcui/angular.integralui.treeview.min.js - About 45 mins to fix

                          Avoid deeply nested control flow statements.
                          Open

                                                  if (xa) {
                                                    angular.element(this);
                                                    b.preventDefault();
                                                    za();
                                                    a.dropMark();
                          Severity: Major
                          Found in myems-admin/js/jcui/angular.integralui.treeview.min.js - About 45 mins to fix

                            Avoid deeply nested control flow statements.
                            Open

                                                    } else if ((option.group_array_index != null) && this.results_data[option.group_array_index].search_match) {
                                                        option.search_match = true;
                                                    }
                            Severity: Major
                            Found in myems-admin/js/plugins/chosen/chosen.jquery.js - About 45 mins to fix

                              Avoid deeply nested control flow statements.
                              Open

                                              for (r = 0; r < u.length; r++) B(u[r], a);
                              Severity: Major
                              Found in myems-admin/js/jcui/angular.integralui.treeview.min.js - About 45 mins to fix

                                Avoid deeply nested control flow statements.
                                Open

                                                  else for (f = e.length - 1; 0 <= f; f--) ob(e[f], c, g, d);
                                Severity: Major
                                Found in myems-admin/js/jcui/angular.integralui.treeview.min.js - About 45 mins to fix

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

                                    getTicks: function(){
                                      var m = 5,
                                          extent = [this.clearMinValue, this.clearMaxValue],
                                          span = extent[1] - extent[0],
                                          step = Math.pow(10, Math.floor(Math.log(span / m) / Math.LN10)),
                                  Severity: Minor
                                  Found in myems-admin/js/plugins/jvectormap/jquery-jvectormap-2.0.2.min.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 (a.sourceCtrl.isObjInSelList(k)) {
                                                    f = !0;
                                                    break;
                                                  }
                                  Severity: Major
                                  Found in myems-admin/js/jcui/angular.integralui.treeview.min.js - About 45 mins to fix

                                    Avoid deeply nested control flow statements.
                                    Open

                                                  else for (r = u.length - 1; 0 <= r; r--) B(u[r], a);
                                    Severity: Major
                                    Found in myems-admin/js/jcui/angular.integralui.treeview.min.js - About 45 mins to fix
                                      Severity
                                      Category
                                      Status
                                      Source
                                      Language