feigi/TemplatePrefetch

View on GitHub

Showing 7 of 11 total issues

Function exports has 94 lines of code (exceeds 25 allowed). Consider refactoring.
Open

module.exports = function (grunt) {
    // Add require for connect-modewrite
    var modRewrite = require('connect-modrewrite');

    // Define the configuration for all the tasks
Severity: Major
Found in Gruntfile.js - About 3 hrs to fix

    File template-prefetch.spec.js has 301 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /**
     * Created by zieglerc on 25/06/15.
     */
    describe('Template Prefetch Module', function () {
    
    
    Severity: Minor
    Found in src/test/template-prefetch.spec.js - About 3 hrs to fix

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

                      function ($rootScope, $state, $stateParams, $templateCache, $http, $log) {
      
                          $log.debug('TemplatePrefetch: Instantiated');
      
                          var prefetch = function (fromState, fromParams) {
      Severity: Major
      Found in src/main/template-prefetch.js - About 2 hrs to fix

        Function initMocks has 41 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                var initMocks = function () {
        
                    rootScopeMock = {
                        $on: jasmine.createSpy('rootScope.on').and.callFake(function (event, callback) {
                            if (event === '$stateChangeSuccess') {
        Severity: Minor
        Found in src/test/template-prefetch.spec.js - About 1 hr to fix

          Function exports has 30 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          module.exports = function (config) {
              config.set({
          
                  // base path that will be used to resolve all patterns (eg. files, exclude)
                  basePath: '../..',
          Severity: Minor
          Found in src/test/karma.conf.js - About 1 hr to fix

            Function prefetch has 27 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                                var prefetch = function (fromState, fromParams) {
            
                                    $log.debug('TemplatePrefetch: Called with fromState ' + fromState + ', fromParams ' + JSON.stringify(fromParams));
            
                                    var edge = findRouteWithFrom(createNode(fromState, fromParams));
            Severity: Minor
            Found in src/main/template-prefetch.js - About 1 hr to fix

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

                              function ($rootScope, $state, $stateParams, $templateCache, $http, $log) {
              Severity: Minor
              Found in src/main/template-prefetch.js - About 45 mins to fix
                Severity
                Category
                Status
                Source
                Language