eiriksm/msg2svg

View on GitHub

Showing 207 of 537 total issues

Function packEnclose has 59 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  function packEnclose(circles) {
    if (!(n = circles.length)) return 0;

    var a, b, c, n;

Severity: Major
Found in out.js - About 2 hrs to fix

    Function create has 59 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      function create(node, id, self) {
        var schedules = node.__transition,
            tween;
    
        // Initialize the self timer when the transition is created.
    Severity: Major
    Found in out.js - About 2 hrs to fix

      Function pie has 58 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        function pie() {
          var value = identity$1,
              sortValues = descending$1,
              sort = null,
              startAngle = constant$1(0),
      Severity: Major
      Found in out.js - About 2 hrs to fix

        Function clipPolygon has 58 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          function clipPolygon(segments, compareIntersection, startInside, interpolate, stream) {
            var subject = [],
                clip = [],
                i,
                n;
        Severity: Major
        Found in out.js - About 2 hrs to fix

          Function clipEdge has 55 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            function clipEdge(edge, x0, y0, x1, y1) {
              var a = edge[0],
                  b = edge[1],
                  ax = a[0],
                  ay = a[1],
          Severity: Major
          Found in out.js - About 2 hrs to fix

            Function tree_find has 54 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              function tree_find(x, y, radius) {
                var data,
                    x0 = this._x0,
                    y0 = this._y0,
                    x1,
            Severity: Major
            Found in out.js - About 2 hrs to fix

              Function albersUsa has 53 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                function albersUsa() {
                  var cache,
                      cacheStream,
                      lower48 = albers(), lower48Point,
                      alaska = conicEqualArea().rotate([154, 0]).center([-2, 58.5]).parallels([55, 65]), alaskaPoint, // EPSG:3338
              Severity: Major
              Found in out.js - About 2 hrs to fix

                Function e has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
                Open

                (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
                Severity: Minor
                Found in out.js - About 2 hrs 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 connectEdge has 52 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                  function connectEdge(edge, x0, y0, x1, y1) {
                    var v1 = edge[1];
                    if (v1) return true;
                
                    var v0 = edge[0],
                Severity: Major
                Found in out.js - About 2 hrs to fix

                  Function clipLine has 52 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                    function clipLine(a, b, x0, y0, x1, y1) {
                      var ax = a[0],
                          ay = a[1],
                          bx = b[0],
                          by = b[1],
                  Severity: Major
                  Found in out.js - About 2 hrs to fix

                    Function parseRows has 50 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        function parseRows(text, f) {
                          var EOL = {}, // sentinel value for end-of-line
                              EOF = {}, // sentinel value for end-of-file
                              rows = [], // output rows
                              N = text.length,
                    Severity: Minor
                    Found in out.js - About 2 hrs to fix

                      Function interpolateTransform has 49 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                        function interpolateTransform(parse, pxComma, pxParen, degParen) {
                      
                          function pop(s) {
                            return s.length ? s.pop() + " " : "";
                          }
                      Severity: Minor
                      Found in out.js - About 1 hr to fix

                        Function ribbon has 49 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                          function ribbon() {
                            var source = defaultSource,
                                target = defaultTarget,
                                radius = defaultRadius$1,
                                startAngle = defaultStartAngle,
                        Severity: Minor
                        Found in out.js - About 1 hr to fix

                          Function stratify has 48 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                            function stratify() {
                              var id = defaultId,
                                  parentId = defaultParentId;
                          
                              function stratify(data) {
                          Severity: Minor
                          Found in out.js - About 1 hr to fix

                            Function point has 48 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                    point: function(lambda, phi) {
                                      var point1 = [lambda, phi],
                                          point2,
                                          v = visible(lambda, phi),
                                          c = smallRadius
                            Severity: Minor
                            Found in out.js - About 1 hr to fix

                              Function newInterval has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                function newInterval(floori, offseti, count, field) {
                              
                                  function interval(date) {
                                    return floori(date = new Date(+date)), date;
                                  }
                              Severity: Minor
                              Found in out.js - About 1 hr to fix

                                Function nest has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                  function nest() {
                                    var keys = [],
                                        sortKeys = [],
                                        sortValues,
                                        rollup,
                                Severity: Minor
                                Found in out.js - About 1 hr to fix

                                  Function move has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                        function move() {
                                          var t;
                                  
                                          dx = point[0] - point0[0];
                                          dy = point[1] - point0[1];
                                  Severity: Minor
                                  Found in out.js - About 1 hr to fix

                                    Function format has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                          function format(value) {
                                            var valuePrefix = prefix,
                                                valueSuffix = suffix,
                                                i, n, c;
                                    
                                    
                                    Severity: Minor
                                    Found in out.js - About 1 hr to fix

                                      Function PathString has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                        function PathString() {
                                          var pointCircle = circle$2(4.5),
                                              string = [];
                                      
                                          var stream = {
                                      Severity: Minor
                                      Found in out.js - About 1 hr to fix
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language