eiriksm/msg2svg

View on GitHub

Showing 537 of 537 total issues

Function arc has 31 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    arc: function(x, y, r, a0, a1, ccw) {
      x = +x, y = +y, r = +r;
      var dx = r * Math.cos(a0),
          dy = r * Math.sin(a0),
          x0 = x + dx,
Severity: Minor
Found in out.js - About 1 hr to fix

    Function selection_data has 31 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      function selection_data(value, key) {
        if (!value) {
          data = new Array(this.size()), j = -1;
          this.each(function(d) { data[++j] = d; });
          return data;
    Severity: Minor
    Found in out.js - About 1 hr to fix

      Function add has 31 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        function add(tree, x, y, d) {
          if (isNaN(x) || isNaN(y)) return tree; // ignore invalid points
      
          var parent,
              node = tree._root,
      Severity: Minor
      Found in out.js - About 1 hr to fix

        Function PathContext has 31 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          function PathContext(context) {
            var pointRadius = 4.5;
        
            var stream = {
              point: point,
        Severity: Minor
        Found in out.js - About 1 hr to fix

          Function y$3 has 30 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            function y$3(y) {
              var strength = constant$6(0.1),
                  nodes,
                  strengths,
                  yz;
          Severity: Minor
          Found in out.js - About 1 hr to fix

            Function linePoint has 30 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                  function linePoint(x, y) {
                    var v = visible(x, y);
                    if (polygon) ring.push([x, y]);
                    if (first) {
                      x__ = x, y__ = y, v__ = v;
            Severity: Minor
            Found in out.js - About 1 hr to fix

              Function x$3 has 30 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                function x$3(x) {
                  var strength = constant$6(0.1),
                      nodes,
                      strengths,
                      xz;
              Severity: Minor
              Found in out.js - About 1 hr to fix

                Function token has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                      function token() {
                        if (I >= N) return EOF; // special case: end of file
                        if (eol) return eol = false, EOL; // special case: end of line
                
                        // special case: quotes
                Severity: Minor
                Found in out.js - About 1 hr to fix

                  Similar blocks of code found in 2 locations. Consider refactoring.
                  Open

                          if (ly < ry) {
                            if (!v0) v0 = [x0, fm * x0 + fb];
                            else if (v0[0] >= x1) return;
                            v1 = [x1, fm * x1 + fb];
                          } else {
                  Severity: Major
                  Found in out.js and 1 other location - About 1 hr to fix

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 59.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Similar blocks of code found in 2 locations. Consider refactoring.
                  Open

                          if (lx > rx) {
                            if (!v0) v0 = [(y0 - fb) / fm, y0];
                            else if (v0[1] >= y1) return;
                            v1 = [(y1 - fb) / fm, y1];
                          } else {
                  Severity: Major
                  Found in out.js and 1 other location - About 1 hr to fix

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 59.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Similar blocks of code found in 2 locations. Consider refactoring.
                  Open

                          } else {
                            if (!v0) v0 = [x1, fm * x1 + fb];
                            else if (v0[0] < x0) return;
                            v1 = [x0, fm * x0 + fb];
                          }
                  Severity: Major
                  Found in out.js and 1 other location - About 1 hr to fix

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 59.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Similar blocks of code found in 2 locations. Consider refactoring.
                  Open

                          } else {
                            if (!v0) v0 = [(y1 - fb) / fm, y1];
                            else if (v0[1] < y0) return;
                            v1 = [(y0 - fb) / fm, y0];
                          }
                  Severity: Major
                  Found in out.js and 1 other location - About 1 hr to fix

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 59.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Function histogram has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      function histogram(data) {
                        var i,
                            n = data.length,
                            x,
                            values = new Array(n);
                  Severity: Minor
                  Found in out.js - About 1 hr to fix

                    Function interpolate$2 has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                      function interpolate$2(a, b) {
                        var x0 = a[0] * radians,
                            y0 = a[1] * radians,
                            x1 = b[0] * radians,
                            y1 = b[1] * radians,
                    Severity: Minor
                    Found in out.js - About 1 hr to fix

                      Function exports has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      module.exports = function(svgContainer, getRandom) {
                        var width = svgContainer.attr('width');
                        var height = svgContainer.attr('height');
                        var lineFunction = d3.line()
                          .x(function(d) { return d.x; })
                      Severity: Minor
                      Found in drawers/lines.js - About 1 hr to fix

                        Function exports has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        module.exports = function(svgContainer, getRandom) {
                          var width = svgContainer.attr('width');
                          var height = svgContainer.attr('height');
                          var lineFunction = d3.line()
                            .x(function(d) { return d.x; })
                        Severity: Minor
                        Found in out.js - About 1 hr to fix

                          Function 2 has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          },{"./index.js":5,"d3":6}],2:[function(require,module,exports){
                          'use strict';
                          var getColor = require('../helpers/colors');
                          
                          module.exports = function(svg, getRandom) {
                          Severity: Minor
                          Found in out.js - About 1 hr to fix

                            Function exports has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            module.exports = function(seed, options) {
                              if (options && options.global === true) {
                                options.global = false;
                                Math.random = module.exports(seed, options);
                                options.global = true;
                            Severity: Minor
                            Found in out.js - About 1 hr to fix

                              Similar blocks of code found in 3 locations. Consider refactoring.
                              Open

                                  scale.align = function(_) {
                                    return arguments.length ? (align = Math.max(0, Math.min(1, _)), rescale()) : align;
                                  };
                              Severity: Major
                              Found in out.js and 2 other locations - About 1 hr to fix

                              Duplicated Code

                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                              Tuning

                              This issue has a mass of 58.

                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                              Refactorings

                              Further Reading

                              Similar blocks of code found in 3 locations. Consider refactoring.
                              Open

                                  scale.paddingOuter = function(_) {
                                    return arguments.length ? (paddingOuter = Math.max(0, Math.min(1, _)), rescale()) : paddingOuter;
                                  };
                              Severity: Major
                              Found in out.js and 2 other locations - About 1 hr to fix

                              Duplicated Code

                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                              Tuning

                              This issue has a mass of 58.

                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                              Refactorings

                              Further Reading

                              Severity
                              Category
                              Status
                              Source
                              Language