conveyal/modeify

View on GitHub
client/components/conveyal/transitive.js/master/lib/graph/edge.js

Summary

Maintainability
F
1 wk
Test Coverage

File edge.js has 550 lines of code (exceeds 250 allowed). Consider refactoring.
Open

var each = require('each');
var PriorityQueue = require('priorityqueuejs');

var Util = require('../util');

Severity: Major
Found in client/components/conveyal/transitive.js/master/lib/graph/edge.js - About 1 day to fix

    Function getRenderCoords has a Cognitive Complexity of 45 (exceeds 5 allowed). Consider refactoring.
    Open

    Edge.prototype.getRenderCoords = function(fromOffsetPx, toOffsetPx, display, forward) {
      var fromOffsetX, fromOffsetY;
      var isBase = (fromOffsetPx === 0 && toOffsetPx === 0);
    
      if (!this.baseRenderCoords && !isBase) {
    Severity: Minor
    Found in client/components/conveyal/transitive.js/master/lib/graph/edge.js - About 6 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 getRenderCoords has 109 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    Edge.prototype.getRenderCoords = function(fromOffsetPx, toOffsetPx, display, forward) {
      var fromOffsetX, fromOffsetY;
      var isBase = (fromOffsetPx === 0 && toOffsetPx === 0);
    
      if (!this.baseRenderCoords && !isBase) {
    Severity: Major
    Found in client/components/conveyal/transitive.js/master/lib/graph/edge.js - About 4 hrs to fix

      Function calculateGeometry has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
      Open

      Edge.prototype.calculateGeometry = function(cellSize, angleConstraint) {
        //if(!this.hasTransit()) angleConstraint = 5;
        angleConstraint = angleConstraint || 45;
      
        this.angleConstraintR = angleConstraint * Math.PI / 180;
      Severity: Minor
      Found in client/components/conveyal/transitive.js/master/lib/graph/edge.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 getGeometricCoords has 57 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      Edge.prototype.getGeometricCoords = function(fromOffsetPx, toOffsetPx, display, forward) {
        var coords = [], lastX = null, lastY = null;
      
        // reverse the coords array if needed
        var geomCoords = forward ? this.geomCoords : this.geomCoords.concat().reverse();
      Severity: Major
      Found in client/components/conveyal/transitive.js/master/lib/graph/edge.js - About 2 hrs to fix

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

        Edge.prototype.calculateGeometry = function(cellSize, angleConstraint) {
          //if(!this.hasTransit()) angleConstraint = 5;
          angleConstraint = angleConstraint || 45;
        
          this.angleConstraintR = angleConstraint * Math.PI / 180;
        Severity: Major
        Found in client/components/conveyal/transitive.js/master/lib/graph/edge.js - About 2 hrs to fix

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

          Edge.prototype.calculateWorldLengthAndMidpoint = function() {
            var allPoints = [this.fromVertex.point].concat(this.pointArray, [this.toVertex
              .point
            ]);
            this.worldLength = 0;
          Severity: Minor
          Found in client/components/conveyal/transitive.js/master/lib/graph/edge.js - About 1 hr to fix

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

            Edge.prototype.coordAlongEdge = function(t, coords, display) {
            
              if (!this.baseRenderCoords) this.calculateBaseRenderCoords(display);
            
              if (coords.length === 2 && this.baseRenderCoords.length === 4) {
            Severity: Minor
            Found in client/components/conveyal/transitive.js/master/lib/graph/edge.js - About 1 hr to fix

              Function coordAlongEdge has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
              Open

              Edge.prototype.coordAlongEdge = function(t, coords, display) {
              
                if (!this.baseRenderCoords) this.calculateBaseRenderCoords(display);
              
                if (coords.length === 2 && this.baseRenderCoords.length === 4) {
              Severity: Minor
              Found in client/components/conveyal/transitive.js/master/lib/graph/edge.js - About 55 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 calculateWorldLengthAndMidpoint has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
              Open

              Edge.prototype.calculateWorldLengthAndMidpoint = function() {
                var allPoints = [this.fromVertex.point].concat(this.pointArray, [this.toVertex
                  .point
                ]);
                this.worldLength = 0;
              Severity: Minor
              Found in client/components/conveyal/transitive.js/master/lib/graph/edge.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 equalVectors has 5 arguments (exceeds 4 allowed). Consider refactoring.
              Open

              function equalVectors(x1, y1, x2, y2, tol) {
              Severity: Minor
              Found in client/components/conveyal/transitive.js/master/lib/graph/edge.js - About 35 mins to fix

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

                Edge.prototype.getAlignmentRange = function(alignmentId) {
                
                  var p1, p2;
                  if (alignmentId === this.fromAlignmentId) {
                    p1 = this.fromVertex;
                Severity: Minor
                Found in client/components/conveyal/transitive.js/master/lib/graph/edge.js - About 25 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

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

                Edge.prototype.adjustFromAngle = function() {
                  var ccw = Util.ccw(this.tx, this.ty, (this.tx + this.tvx), (this.ty + this.tvy),
                    this.fx, this.fy);
                  var delta = (ccw > 0) ? this.angleConstraintR : -this.angleConstraintR;
                  var i = 0,
                client/components/conveyal/transitive.js/master/lib/graph/edge.js on lines 234..251

                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 271.

                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

                Edge.prototype.adjustToAngle = function() {
                  var ccw = Util.ccw(this.fx, this.fy, (this.fx + this.fvx), (this.fy + this.fvy),
                    this.tx, this.ty);
                  var delta = (ccw > 0) ? this.angleConstraintR : -this.angleConstraintR;
                  var i = 0,
                client/components/conveyal/transitive.js/master/lib/graph/edge.js on lines 258..275

                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 271.

                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 (i > 0) {
                      var prevCoord = geomCoords[i - 1];
                      var x0 = display.xScale(prevCoord[0]);
                      var y0 = display.yScale(prevCoord[1]);
                      if (x1 === x0 && y1 === y0) return;
                client/components/conveyal/transitive.js/master/lib/graph/edge.js on lines 431..441

                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 100.

                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 (i < geomCoords.length - 1) {
                      var nextCoord = geomCoords[i + 1];
                      var x2 = display.xScale(nextCoord[0]);
                      var y2 = display.yScale(nextCoord[1]);
                      if(x2 === x1 && y2 === y1) return;
                client/components/conveyal/transitive.js/master/lib/graph/edge.js on lines 418..428

                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 100.

                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(fromVector && !toVector) { // the first point in the geomCoords sequence
                      rightVector = Util.normalizeVector({
                        x: fromVector.y,
                        y: -fromVector.x
                      });
                client/components/conveyal/transitive.js/master/lib/graph/edge.js on lines 451..469

                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 72.

                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(!fromVector && toVector) { // the last point in the geomCoords sequence
                      rightVector = Util.normalizeVector({
                        x: toVector.y,
                        y: -toVector.x
                      });
                client/components/conveyal/transitive.js/master/lib/graph/edge.js on lines 443..469

                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 72.

                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

                Edge.prototype.addRenderedEdge = function(rEdge) {
                  if (this.renderedEdges.indexOf(rEdge) !== -1) return;
                  this.renderedEdges.push(rEdge);
                };
                client/components/conveyal/transitive.js/master/lib/core/network.js on lines 598..601

                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

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

                      var dist = Util.distance(allPoints[i].worldX, allPoints[i].worldY,
                        allPoints[i + 1].worldX, allPoints[i + 1].worldY);
                client/components/conveyal/transitive.js/master/lib/graph/edge.js on lines 63..64

                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 52.

                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

                    this.worldLength += Util.distance(allPoints[i].worldX, allPoints[i].worldY,
                      allPoints[i + 1].worldX, allPoints[i + 1].worldY);
                client/components/conveyal/transitive.js/master/lib/graph/edge.js on lines 75..76

                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 52.

                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 (alignmentId.substring(0, 2) === '90') {
                    min = Math.min(p1.y, p2.y);
                    max = Math.max(p1.y, p2.y);
                  } else {
                client/components/conveyal/transitive.js/master/lib/graph/edge.js on lines 381..384

                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 51.

                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 {
                    min = Math.min(p1.x, p2.x);
                    max = Math.max(p1.x, p2.x);
                  }
                client/components/conveyal/transitive.js/master/lib/graph/edge.js on lines 378..381

                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 51.

                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

                Edge.prototype.getWorldLength = function() {
                  if (!this.worldLength) this.calculateWorldLengthAndMidpoint();
                  return this.worldLength;
                };
                client/components/conveyal/transitive.js/master/lib/graph/edge.js on lines 52..55

                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 47.

                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

                Edge.prototype.getWorldMidpoint = function() {
                  if (!this.worldMidpoint) this.calculateWorldLengthAndMidpoint();
                  return this.worldMidpoint;
                };
                client/components/conveyal/transitive.js/master/lib/graph/edge.js on lines 47..50

                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 47.

                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

                          y: allPoints[i].worldY + t * (allPoints[i + 1].worldY - allPoints[i].worldY)
                client/components/conveyal/transitive.js/master/lib/graph/edge.js on lines 81..81

                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 45.

                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

                          x: allPoints[i].worldX + t * (allPoints[i + 1].worldX - allPoints[i].worldX),
                client/components/conveyal/transitive.js/master/lib/graph/edge.js on lines 82..82

                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 45.

                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

                There are no issues that match your filters.

                Category
                Status