eiriksm/msg2svg

View on GitHub

Showing 207 of 537 total issues

Avoid deeply nested control flow statements.
Open

            for (i = 0, n = points.length; i < n; ++i) stream.point((point = points[i])[0], point[1]);
Severity: Major
Found in out.js - About 45 mins to fix

    Consider simplifying this complex logical expression.
    Open

              if (Math.abs(endX - startX) > epsilon$3 || Math.abs(endY - startY) > epsilon$3) {
                halfedges.splice(iHalfedge, 0, edges.push(createBorderEdge(site, end,
                    Math.abs(endX - x0) < epsilon$3 && y1 - endY > epsilon$3 ? [x0, Math.abs(startX - x0) < epsilon$3 ? startY : y1]
                    : Math.abs(endY - y1) < epsilon$3 && x1 - endX > epsilon$3 ? [Math.abs(startY - y1) < epsilon$3 ? startX : x1, y1]
                    : Math.abs(endX - x1) < epsilon$3 && endY - y0 > epsilon$3 ? [x1, Math.abs(startX - x1) < epsilon$3 ? startY : y0]
    Severity: Major
    Found in out.js - About 40 mins to fix

      Function arcTo has 5 arguments (exceeds 4 allowed). Consider refactoring.
      Open

          arcTo: function(x1, y1, x2, y2, r) {
      Severity: Minor
      Found in out.js - About 35 mins to fix

        Function connectEdge has 5 arguments (exceeds 4 allowed). Consider refactoring.
        Open

          function connectEdge(edge, x0, y0, x1, y1) {
        Severity: Minor
        Found in out.js - About 35 mins to fix

          Function Quad has 5 arguments (exceeds 4 allowed). Consider refactoring.
          Open

            function Quad(node, x0, y0, x1, y1) {
          Severity: Minor
          Found in out.js - About 35 mins to fix

            Function treemapDice has 5 arguments (exceeds 4 allowed). Consider refactoring.
            Open

              function treemapDice(parent, x0, y0, x1, y1) {
            Severity: Minor
            Found in out.js - About 35 mins to fix

              Function apply has 5 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                    function apply(quad, x0, y0, x1, y1) {
              Severity: Minor
              Found in out.js - About 35 mins to fix

                Function clipPolygon has 5 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                  function clipPolygon(segments, compareIntersection, startInside, interpolate, stream) {
                Severity: Minor
                Found in out.js - About 35 mins to fix

                  Function basis$1 has 5 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                    function basis$1(t1, v0, v1, v2, v3) {
                  Severity: Minor
                  Found in out.js - About 35 mins to fix

                    Function resquarify has 5 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                        function resquarify(parent, x0, y0, x1, y1) {
                    Severity: Minor
                    Found in out.js - About 35 mins to fix

                      Function clipEdge has 5 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                        function clipEdge(edge, x0, y0, x1, y1) {
                      Severity: Minor
                      Found in out.js - About 35 mins to fix

                        Function beforestart has 5 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                            function beforestart(id, container, point, that, args) {
                        Severity: Minor
                        Found in out.js - About 35 mins to fix

                          Function squarify has 5 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

                              function squarify(parent, x0, y0, x1, y1) {
                          Severity: Minor
                          Found in out.js - About 35 mins to fix

                            Function binary has 5 arguments (exceeds 4 allowed). Consider refactoring.
                            Open

                              function binary(parent, x0, y0, x1, y1) {
                            Severity: Minor
                            Found in out.js - About 35 mins to fix

                              Function sliceDice has 5 arguments (exceeds 4 allowed). Consider refactoring.
                              Open

                                function sliceDice(parent, x0, y0, x1, y1) {
                              Severity: Minor
                              Found in out.js - About 35 mins to fix

                                Function treemapSlice has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                Open

                                  function treemapSlice(parent, x0, y0, x1, y1) {
                                Severity: Minor
                                Found in out.js - About 35 mins to fix

                                  Function 6 has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                  Open

                                  },{"./drawers/circles":2,"./drawers/lines":3,"d3":6,"seed-random":7}],6:[function(require,module,exports){
                                  // https://d3js.org Version 4.1.1. Copyright 2016 Mike Bostock.
                                  (function (global, factory) {
                                    typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
                                    typeof define === 'function' && define.amd ? define(['exports'], factory) :
                                  Severity: Minor
                                  Found in out.js - About 35 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 too many return statements within this function.
                                  Open

                                      return parent[j] = node, parent[i] = leaf, tree;
                                  Severity: Major
                                  Found in out.js - About 30 mins to fix

                                    Avoid too many return statements within this function.
                                    Open

                                              else if (v0[0] < x0) return;
                                    Severity: Major
                                    Found in out.js - About 30 mins to fix

                                      Avoid too many return statements within this function.
                                      Open

                                          if (previous) return (next ? previous.next = next : delete previous.next), this;
                                      Severity: Major
                                      Found in out.js - About 30 mins to fix
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language