conveyal/modeify

View on GitHub

Showing 301 of 580 total issues

File fore.js has 5496 lines of code (exceeds 250 allowed). Consider refactoring.
Open


module.exports = [
  "Aaron"
, "Aaron"
, "Abbey"
Severity: Major
Found in client/components/trevorgerhardt/names/0.0.2/lib/fore.js - About 2 wks to fix

    Function Labeler has 300 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    var Labeler = augment(Object, function() {
    
      this.constructor = function(transitive) {
    
        this.transitive = transitive;
    Severity: Major
    Found in client/components/conveyal/transitive.js/master/lib/labeler/index.js - About 1 day to fix

      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 MultiPoint has a Cognitive Complexity of 54 (exceeds 5 allowed). Consider refactoring.
        Open

        var MultiPoint = augment(Point, function(base) {
        
          this.constructor = function(pointArray) {
            base.constructor.call(this);
            this.points = [];

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

        var Point = augment(Object, function() {
        
          this.constructor = function(data) {
            for (var key in data) {
              this[key] = data[key];
        Severity: Major
        Found in client/components/conveyal/transitive.js/master/lib/point/index.js - About 7 hrs to fix

          Function DefaultRenderer has 190 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          var DefaultRenderer = augment(Renderer, function(base) {
          
            this.constructor = function(transitive) {
              base.constructor.call(this, transitive);
            };

            Function Stop has a Cognitive Complexity of 49 (exceeds 5 allowed). Consider refactoring.
            Open

            var Stop = augment(Point, function(base) {
            
              this.constructor = function(data) {
                base.constructor.call(this, data);
            
            
            Severity: Minor
            Found in client/components/conveyal/transitive.js/master/lib/point/stop.js - About 7 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

            File index.js has 480 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            var d3 = require('d3');
            var debug = require('debug')('transitive:graph');
            var each = require('each');
            var clone = require('clone');
            var PriorityQueue = require('priorityqueuejs');
            Severity: Minor
            Found in client/components/conveyal/transitive.js/master/lib/graph/index.js - About 7 hrs to fix

              Function convertOtpData has 180 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              Profiler.prototype.convertOtpData = function(opts) {
                var self = this;
                self.data = {
                  journeys: [],
                  patterns: [],
              Severity: Major
              Found in client/components/conveyal/otp-profiler/master/index.js - About 7 hrs to fix

                Function PointLabel has 176 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                var PointLabel = augment(Label, function(base) {
                
                  this.constructor = function(parent) {
                
                    base.constructor.call(this, parent);

                  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 PointLabel has a Cognitive Complexity of 45 (exceeds 5 allowed). Consider refactoring.
                  Open

                  var PointLabel = augment(Label, function(base) {
                  
                    this.constructor = function(parent) {
                  
                      base.constructor.call(this, parent);

                  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

                  File index.js has 453 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  var Batch = require('batch');
                  var clone, each;
                  var superagent = require('superagent');
                  
                  try {
                  Severity: Minor
                  Found in client/components/conveyal/otp-profiler/master/index.js - About 6 hrs to fix

                    Function MultiPoint has 160 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    var MultiPoint = augment(Point, function(base) {
                    
                      this.constructor = function(pointArray) {
                        base.constructor.call(this);
                        this.points = [];

                      Function Stop has 159 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      var Stop = augment(Point, function(base) {
                      
                        this.constructor = function(data) {
                          base.constructor.call(this, data);
                      
                      
                      Severity: Major
                      Found in client/components/conveyal/transitive.js/master/lib/point/stop.js - About 6 hrs to fix

                        File index.js has 415 lines of code (exceeds 250 allowed). Consider refactoring.
                        Open

                        var Batch = require('batch')
                        var model = require('component-model')
                        var qs = require('component-querystring')
                        const typ = require('component-type')
                        const ll = require('@conveyal/lonlat')
                        Severity: Minor
                        Found in client/plan/index.js - About 5 hrs to fix

                          File client.js has 414 lines of code (exceeds 250 allowed). Consider refactoring.
                          Open

                          /**
                           * Module dependencies.
                           */
                          
                          var Emitter = require('emitter');
                          Severity: Minor
                          Found in client/components/visionmedia/superagent/v1.1.0/lib/client.js - About 5 hrs to fix

                            File network.js has 389 lines of code (exceeds 250 allowed). Consider refactoring.
                            Open

                            var each = require('each');
                            var debug = require('debug')('transitive:network');
                            var Emitter = require('emitter');
                            
                            var NetworkPath = require('./path');
                            Severity: Minor
                            Found in client/components/conveyal/transitive.js/master/lib/core/network.js - About 5 hrs to fix

                              Function SphericalMercator has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring.
                              Open

                              var SphericalMercator = (function() {
                              
                                // Closures including constants and other precalculated values.
                                var cache = {},
                                  EPSLN = 1.0e-10,

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

                              var SphericalMercator = (function() {
                              
                                // Closures including constants and other precalculated values.
                                var cache = {},
                                  EPSLN = 1.0e-10,
                                Severity
                                Category
                                Status
                                Source
                                Language