opsforgeio/cabot

View on GitHub

Showing 840 of 1,637 total issues

Avoid deeply nested control flow statements.
Open

                            if (stop) {
                                break;
                            }
Severity: Major
Found in cabot/static/arachnys/js/raphael.js - About 45 mins to fix

    Avoid deeply nested control flow statements.
    Open

                for (var i = 0, n = points.length; i < n; ++i) listener.point((point = points[i])[0], point[1]);
    Severity: Major
    Found in cabot/static/arachnys/js/d3.js - About 45 mins to fix

      Avoid deeply nested control flow statements.
      Open

                while (++i < n) if (!d3_selection_classedRe(name[i]).test(value)) return false;
      Severity: Major
      Found in cabot/static/arachnys/js/d3.js - About 45 mins to fix

        Avoid deeply nested control flow statements.
        Open

                      if (angle(λ0, λ) > angle(λ0, λ1)) λ1 = λ;
        Severity: Major
        Found in cabot/static/arachnys/js/d3.js - About 45 mins to fix

          Avoid deeply nested control flow statements.
          Open

                      for (j = i + 1; j < n; ++j) q[j].i--;
          Severity: Major
          Found in cabot/static/arachnys/js/d3.js - About 45 mins to fix

            Avoid deeply nested control flow statements.
            Open

                        if (d3_layout_packIntersects(j, c)) {
                          isect = 1;
                          break;
                        }
            Severity: Major
            Found in cabot/static/arachnys/js/d3.js - About 45 mins to fix

              Avoid deeply nested control flow statements.
              Open

                          if (subnode = subnodes[k]) d3_transitionNode(subnode, k, id, transition);
              Severity: Major
              Found in cabot/static/arachnys/js/d3.js - About 45 mins to fix

                Avoid deeply nested control flow statements.
                Open

                          while (++i < n) if (!value.contains(name[i])) return false;
                Severity: Major
                Found in cabot/static/arachnys/js/d3.js - About 45 mins to fix

                  Avoid deeply nested control flow statements.
                  Open

                              for (j = i + 1; j < n; ++j) q[j].i -= 2;
                  Severity: Major
                  Found in cabot/static/arachnys/js/d3.js - About 45 mins to fix

                    Avoid deeply nested control flow statements.
                    Open

                                for (k = a._pack_prev; k !== j._pack_prev; k = k._pack_prev, s2++) {
                                  if (d3_layout_packIntersects(k, c)) {
                                    break;
                                  }
                                }
                    Severity: Major
                    Found in cabot/static/arachnys/js/d3.js - About 45 mins to fix

                      Avoid deeply nested control flow statements.
                      Open

                                  for (var i = points.length - 1; i >= 0; --i) listener.point((point = points[i])[0], point[1]);
                      Severity: Major
                      Found in cabot/static/arachnys/js/d3.js - About 45 mins to fix

                        Avoid deeply nested control flow statements.
                        Open

                                    for (j = i + 1; j < n; ++j) q[j].i--;
                        Severity: Major
                        Found in cabot/static/arachnys/js/d3.js - About 45 mins to fix

                          Avoid deeply nested control flow statements.
                          Open

                                      if (s1 < s2 || s1 == s2 && b.r < a.r) d3_layout_packSplice(a, b = j); else d3_layout_packSplice(a = k, b);
                          Severity: Major
                          Found in cabot/static/arachnys/js/d3.js - About 45 mins to fix

                            Avoid deeply nested control flow statements.
                            Open

                                          if (angle(λ, λ1) > angle(λ0, λ1)) λ0 = λ;
                            Severity: Major
                            Found in cabot/static/arachnys/js/d3.js - About 45 mins to fix

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

                              Rickshaw.Fixtures.Number.formatBase1024KMGTP = function(y) {
                                  var abs_y = Math.abs(y);
                                  if (abs_y >= 1125899906842624)  { return y / 1125899906842624 + "P" }
                                  else if (abs_y >= 1099511627776){ return y / 1099511627776 + "T" }
                                  else if (abs_y >= 1073741824)   { return y / 1073741824 + "G" }
                              Severity: Minor
                              Found in cabot/static/arachnys/js/rickshaw.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 formatKMBT has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                              Open

                              Rickshaw.Fixtures.Number.formatKMBT = function(y) {
                                var abs_y = Math.abs(y);
                                if (abs_y >= 1000000000000)   { return y / 1000000000000 + "T" }
                                else if (abs_y >= 1000000000) { return y / 1000000000 + "B" }
                                else if (abs_y >= 1000000)    { return y / 1000000 + "M" }
                              Severity: Minor
                              Found in cabot/static/arachnys/js/rickshaw.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 (q[7] === '+') {
                                          offsetmins = 0 - offsetmins;
                                        }
                              Severity: Major
                              Found in cabot/static/arachnys/js/morris.js - About 45 mins to fix

                                Avoid deeply nested control flow statements.
                                Open

                                        if (r[8] !== 'Z') {
                                          offsetmins = parseInt(r[10], 10) * 60 + parseInt(r[11], 10);
                                          if (r[9] === '+') {
                                            offsetmins = 0 - offsetmins;
                                          }
                                Severity: Major
                                Found in cabot/static/arachnys/js/morris.js - About 45 mins to fix

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

                                    formatter: function(series, x, y, formattedX, formattedY, d) {
                                  Severity: Minor
                                  Found in cabot/static/arachnys/js/rickshaw.js - About 45 mins to fix

                                    Avoid deeply nested control flow statements.
                                    Open

                                                      if (ymax != null) {
                                                        ymax = Math.max(yval, ymax);
                                                        ymin = Math.min(yval, ymin);
                                                      } else {
                                                        ymax = ymin = yval;
                                    Severity: Major
                                    Found in cabot/static/arachnys/js/morris.js - About 45 mins to fix
                                      Severity
                                      Category
                                      Status
                                      Source
                                      Language