angular/angular.js

View on GitHub
src/ngResource/resource.js

Summary

Maintainability
F
4 days
Test Coverage

Function ResourceProvider has 273 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  provider('$resource', function ResourceProvider() {
    var PROTOCOL_AND_IPV6_REGEX = /^https?:\/\/\[[^\]]*][^/]*/;

    var provider = this;

Severity: Major
Found in src/ngResource/resource.js - About 1 day to fix

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

        this.$get = ['$http', '$log', '$q', '$timeout', function($http, $log, $q, $timeout) {
    
          var noop = angular.noop,
              forEach = angular.forEach,
              extend = angular.extend,
    Severity: Major
    Found in src/ngResource/resource.js - About 1 day to fix

      Function resourceFactory has 181 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

            function resourceFactory(url, paramDefaults, actions, options) {
              var route = new Route(url, options);
      
              actions = extend({}, provider.defaults.actions, actions);
      
      
      Severity: Major
      Found in src/ngResource/resource.js - About 7 hrs to fix

        Function name has 131 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                  Resource[name] = function(a1, a2, a3, a4) {
                    var params = {}, data, onSuccess, onError;
        
                    switch (arguments.length) {
                      case 4:
        Severity: Major
        Found in src/ngResource/resource.js - About 5 hrs to fix

          File resource.js has 307 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          'use strict';
          
          var $resourceMinErr = angular.$$minErr('$resource');
          
          // Helper functions and regex to lookup a dotted path on an object
          Severity: Minor
          Found in src/ngResource/resource.js - About 3 hrs to fix

            Function setUrlParams has 56 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    setUrlParams: function(config, params, actionUrl) {
                      var self = this,
                        url = actionUrl || self.template,
                        val,
                        encodedVal,
            Severity: Major
            Found in src/ngResource/resource.js - About 2 hrs to fix

              There are no issues that match your filters.

              Category
              Status