agarzola/bustime

View on GitHub

Showing 5 of 7 total issues

Function requests has 82 lines of code (exceeds 25 allowed). Consider refactoring.
Open

var requests = function (apiObj) {
  return {
    specialMethod: function (name, reqObj, callback) {
      var parent = this;
      // Run reqObj through the validator:
Severity: Major
Found in lib/requests.js - About 3 hrs to fix

Function utility has 79 lines of code (exceeds 25 allowed). Consider refactoring.
Open

var utility = function (apiObj) {
  var requests  = require('./requests')(apiObj),
      async     = require('async')
      ;

Severity: Major
Found in lib/utility.js - About 3 hrs to fix

Function bustimeInit has 37 lines of code (exceeds 25 allowed). Consider refactoring.
Open

var bustimeInit = function (apiObj) {
  var requests    = require('./lib/requests')(apiObj),
      validate    = require('./lib/validate'),
      services    = require('./lib/services'),
      utility     = require('./lib/utility')(apiObj)
Severity: Minor
Found in index.js - About 1 hr to fix

Function collectRoutesAndStops has 34 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    collectRoutesAndStops: function (callback, config) {
      var defaults = {
        format: 'array'
      }

Severity: Minor
Found in lib/utility.js - About 1 hr to fix

Function genericMethod has 28 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    genericMethod: function (requestType, reqObj, callback) {
      // Set a bunch of default variables for use in the request to the BusTracker API:
      var host        = apiObj.host,
          path        = apiObj.path || '/bustime/api/v1',
          port        = apiObj.port || 80,
Severity: Minor
Found in lib/requests.js - About 1 hr to fix
Severity
Category
Status
Source
Language