hugoruscitti/pilas

View on GitHub
data/asistente/js/angular-route.js

Summary

Maintainability
D
3 days
Test Coverage

Function $RouteProvider has 185 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function $RouteProvider(){
  function inherit(parent, extra) {
    return angular.extend(new (angular.extend(function() {}, {prototype:parent}))(), extra);
  }

Severity: Major
Found in data/asistente/js/angular-route.js - About 7 hrs to fix

    Function $get has 123 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

          function($rootScope, $location, $routeParams, $q, $injector, $http, $templateCache, $sce) {
    
        /**
         * @ngdoc object
         * @name ngRoute.$route
    Severity: Major
    Found in data/asistente/js/angular-route.js - About 4 hrs to fix

      Function updateRoute has 67 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          function updateRoute() {
            var next = parseRoute(),
                last = $route.current;
      
            if (next && last && next.$$route === last.$$route
      Severity: Major
      Found in data/asistente/js/angular-route.js - About 2 hrs to fix

        File angular-route.js has 270 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        /**
         * @license AngularJS v1.2.10-build.2178+sha.40dc806
         * (c) 2010-2014 Google, Inc. http://angularjs.org
         * License: MIT
         */
        Severity: Minor
        Found in data/asistente/js/angular-route.js - About 2 hrs to fix

          Function ngViewFactory has 47 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          function ngViewFactory(   $route,   $anchorScroll,   $animate) {
            return {
              restrict: 'ECA',
              terminal: true,
              priority: 400,
          Severity: Minor
          Found in data/asistente/js/angular-route.js - About 1 hr to fix

            Function link has 39 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                link: function(scope, $element, attr, ctrl, $transclude) {
                    var currentScope,
                        currentElement,
                        autoScrollExp = attr.autoscroll,
                        onloadExp = attr.onload || '';
            Severity: Minor
            Found in data/asistente/js/angular-route.js - About 1 hr to fix

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

                    function($rootScope, $location, $routeParams, $q, $injector, $http, $templateCache, $sce) {
              Severity: Major
              Found in data/asistente/js/angular-route.js - About 1 hr to fix

                Avoid deeply nested control flow statements.
                Open

                                if (angular.isFunction(templateUrl)) {
                                  templateUrl = templateUrl(next.params);
                                }
                Severity: Major
                Found in data/asistente/js/angular-route.js - About 45 mins to fix

                  Avoid deeply nested control flow statements.
                  Open

                                  if (angular.isDefined(templateUrl)) {
                                    next.loadedTemplateUrl = templateUrl;
                                    template = $http.get(templateUrl, {cache: $templateCache}).
                                        then(function(response) { return response.data; });
                                  }
                  Severity: Major
                  Found in data/asistente/js/angular-route.js - About 45 mins to fix

                    Consider simplifying this complex logical expression.
                    Open

                          if (next && last && next.$$route === last.$$route
                              && angular.equals(next.pathParams, last.pathParams)
                              && !next.reloadOnSearch && !forceReload) {
                            last.params = next.params;
                            angular.copy(last.params, $routeParams);
                    Severity: Major
                    Found in data/asistente/js/angular-route.js - About 40 mins to fix

                      Function link has 5 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                          link: function(scope, $element, attr, ctrl, $transclude) {
                      Severity: Minor
                      Found in data/asistente/js/angular-route.js - About 35 mins to fix

                        There are no issues that match your filters.

                        Category
                        Status