eiriksm/msg2svg

View on GitHub

Showing 537 of 537 total issues

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

            if (signX) dx = Math.max(W - w0, Math.min(E - e0, dx)), w1 = w0 + dx, e1 = e0 + dx;
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 57.

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 keydowned has 27 lines of code (exceeds 25 allowed). Consider refactoring.
Open

      function keydowned() {
        switch (exports.event.keyCode) {
          case 16: { // SHIFT
            shifting = signX && signY;
            break;
Severity: Minor
Found in out.js - About 1 hr to fix

    Function rotationPhiGamma has 27 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      function rotationPhiGamma(deltaPhi, deltaGamma) {
        var cosDeltaPhi = cos$1(deltaPhi),
            sinDeltaPhi = sin$1(deltaPhi),
            cosDeltaGamma = cos$1(deltaGamma),
            sinDeltaGamma = sin$1(deltaGamma);
    Severity: Minor
    Found in out.js - About 1 hr to fix

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

                this._context.moveTo((this._x2 + 2 * this._x3) / 3, (this._y2 + 2 * this._y3) / 3);
      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 56.

      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

                this._context.lineTo((this._x3 + 2 * this._x2) / 3, (this._y3 + 2 * this._y2) / 3);
      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 56.

      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

          graticule.step = function(_) {
            if (!arguments.length) return graticule.stepMinor();
            return graticule.stepMajor(_).stepMinor(_);
          };
      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 56.

      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

          graticule.extent = function(_) {
            if (!arguments.length) return graticule.extentMinor();
            return graticule.extentMajor(_).extentMinor(_);
          };
      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 56.

      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

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

          lineStart: function() {
            this._x0 = this._x1 =
            this._y0 = this._y1 = NaN;
            this._point = 0;
          },
      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 56.

      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

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

          lineStart: function() {
            this._x0 = this._x1 =
            this._y0 = this._y1 = NaN;
            this._point = 0;
          },
      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 56.

      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 center$1 has 26 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        function center$1(x, y) {
          var nodes;
      
          if (x == null) x = 0;
          if (y == null) y = 0;
      Severity: Minor
      Found in out.js - About 1 hr to fix

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

        module.exports = function(svg, getRandom) {
          var width = svg.attr('width');
          var height = svg.attr('height');
          // Find out how many circles.
          var numCirlces = getRandom(Math.floor(width / 48)) + 1;
        Severity: Minor
        Found in out.js - About 1 hr to fix

          Function variance has 26 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            function variance(array, f) {
              var n = array.length,
                  m = 0,
                  a,
                  d,
          Severity: Minor
          Found in out.js - About 1 hr to fix

            Function apply has 26 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                function apply(quad, x1, _, x2) {
                  if (!quad.value) return true;
            
                  var x = quad.x - node.x,
                      y = quad.y - node.y,
            Severity: Minor
            Found in out.js - About 1 hr to fix

              Function bounds has 26 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                function bounds(feature) {
                  var i, n, a, b, merged, deltaMax, delta;
              
                  if (deltaSum) deltaSum.reset();
                  else deltaSum = adder();
              Severity: Minor
              Found in out.js - About 1 hr to fix

                Function tickFormat has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                  function tickFormat(domain, count, specifier) {
                    var start = domain[0],
                        stop = domain[domain.length - 1],
                        step = tickStep(start, stop, count == null ? 10 : count),
                        precision;
                Severity: Minor
                Found in out.js - About 1 hr to fix

                  Function 5 has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  },{}],5:[function(require,module,exports){
                  'use strict';
                  var d3 = require('d3');
                  var seed = require('seed-random');
                  
                  
                  Severity: Minor
                  Found in out.js - About 1 hr to fix

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

                    module.exports = function(svg, getRandom) {
                      var width = svg.attr('width');
                      var height = svg.attr('height');
                      // Find out how many circles.
                      var numCirlces = getRandom(Math.floor(width / 48)) + 1;
                    Severity: Minor
                    Found in drawers/circles.js - About 1 hr to fix

                      Function custom has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                        var resquarify = (function custom(ratio) {
                      
                          function resquarify(parent, x0, y0, x1, y1) {
                            if ((rows = parent._squarify) && (rows.ratio === ratio)) {
                              var rows,
                      Severity: Minor
                      Found in out.js - About 1 hr to fix

                        Function partition has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            function partition(i, j, value, x0, y0, x1, y1) {
                              if (i >= j - 1) {
                                var node = nodes[i];
                                node.x0 = x0, node.y0 = y0;
                                node.x1 = x1, node.y1 = y1;
                        Severity: Minor
                        Found in out.js - About 1 hr to fix

                          Function intersect has 8 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

                            function intersect(x0, y0, x1, y1, x2, y2, x3, y3) {
                          Severity: Major
                          Found in out.js - About 1 hr to fix
                            Severity
                            Category
                            Status
                            Source
                            Language