analog-nico/pathjs-amd

View on GitHub

Showing 4 of 4 total issues

File gulpfile.js has 265 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/* jshint node: true */
'use strict';

var _ = require('lodash');
var gulp = require('gulp');
Severity: Minor
Found in gulpfile.js - About 2 hrs to fix

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

        Path.match = function (path, parameterize) {
            var params = {}, route = null, possible_routes, slice, i, j, compare;
            for (route in Path.routes.defined) {
                if (route !== null && route !== undefined) {
                    route = Path.routes.defined[route];
    Severity: Minor
    Found in src/path.js - About 1 hr to fix

      Avoid deeply nested control flow statements.
      Open

                              if (parameterize) {
                                  route.params = params;
                              }
      Severity: Major
      Found in src/path.js - About 45 mins to fix

        Avoid deeply nested control flow statements.
        Open

                                for (i = 0; i < slice.split("/").length; i+=1) {
                                    if ((i < compare.split("/").length) && (slice.split("/")[i].charAt(0) === ":")) {
                                        params[slice.split('/')[i].replace(/:/, '')] = compare.split("/")[i];
                                        compare = compare.replace(compare.split("/")[i], slice.split("/")[i]);
                                    }
        Severity: Major
        Found in src/path.js - About 45 mins to fix
          Severity
          Category
          Status
          Source
          Language