shaungrady/angular-http-etag

View on GitHub

Showing 91 of 91 total issues

Function adaptCache has 55 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    external_angular_default.a.forEach(cacheDefinitions, function adaptCache (config, cacheId) {
      adaptedServices[config.cacheService].createCache(cacheId, config)
      var cache = caches[cacheId] = adaptedServices[config.cacheService].getCache(cacheId)
      var adaptedCache = adaptedCaches[cacheId] = {}
      // Determine whether to perform deepcopying or not
Severity: Major
Found in release/angular-http-etag.js - About 2 hrs to fix

    Function adaptCache has 55 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        angular.forEach(cacheDefinitions, function adaptCache (config, cacheId) {
          adaptedServices[config.cacheService].createCache(cacheId, config)
          var cache = caches[cacheId] = adaptedServices[config.cacheService].getCache(cacheId)
          var adaptedCache = adaptedCaches[cacheId] = {}
          // Determine whether to perform deepcopying or not
    Severity: Major
    Found in src/service.js - About 2 hrs to fix

      Function adaptCache has 55 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          external_angular_default.a.forEach(cacheDefinitions, function adaptCache (config, cacheId) {
            adaptedServices[config.cacheService].createCache(cacheId, config)
            var cache = caches[cacheId] = adaptedServices[config.cacheService].getCache(cacheId)
            var adaptedCache = adaptedCaches[cacheId] = {}
            // Determine whether to perform deepcopying or not
      Severity: Major
      Found in lib/index.js - About 2 hrs to fix

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

        function recursiveCopy(value, clone, references, visited, customizer) {
          const type = detectType(value);
          const copiedValue = copier_copy(value, type);
        
          // return if not a collection value
        Severity: Minor
        Found in release/angular-http-etag.js - About 1 hr to fix

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

          module.exports = function (config) {
            config.set({
              basePath: '',
              frameworks: ['mocha'],
              files: ngConfig.files,
          Severity: Minor
          Found in .config/karma.conf.js - About 1 hr to fix

            Function httpEtagPromiseFactory has 46 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                function httpEtagPromiseFactory (httpPromise) {
                  var then = httpPromise.then
                  var success = httpPromise.success
            
                  if (useLegacyPromiseExtensions) {
            Severity: Minor
            Found in release/angular-http-etag.js - About 1 hr to fix

              Function httpEtagPromiseFactory has 46 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  function httpEtagPromiseFactory (httpPromise) {
                    var then = httpPromise.then
                    var success = httpPromise.success
              
                    if (useLegacyPromiseExtensions) {
              Severity: Minor
              Found in lib/index.js - About 1 hr to fix

                Function httpEtagPromiseFactory has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    function httpEtagPromiseFactory (httpPromise) {
                      var then = httpPromise.then
                      var success = httpPromise.success
                
                      if (useLegacyPromiseExtensions) {
                Severity: Minor
                Found in src/httpDecorator.js - About 1 hr to fix

                  Identical blocks of code found in 2 locations. Consider refactoring.
                  Open

                    httpEtagProvider.defineCache = function httpEtagDefineCache (cacheId, config) {
                      config = external_angular_default.a.extend({}, defaultEtagCacheConfig, config, { id: cacheId })
                      cacheDefinitions[cacheId] = config
                      return httpEtagProvider
                    }
                  Severity: Major
                  Found in lib/index.js and 1 other location - About 1 hr to fix
                  release/angular-http-etag.js on lines 1310..1314

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 63.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Identical blocks of code found in 2 locations. Consider refactoring.
                  Open

                    httpEtagProvider.defineCache = function httpEtagDefineCache (cacheId, config) {
                      config = external_angular_default.a.extend({}, defaultEtagCacheConfig, config, { id: cacheId })
                      cacheDefinitions[cacheId] = config
                      return httpEtagProvider
                    }
                  Severity: Major
                  Found in release/angular-http-etag.js and 1 other location - About 1 hr to fix
                  lib/index.js on lines 191..195

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 63.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

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

                  var keysShim = function keys(object) {
                      var isObject = object !== null && typeof object === 'object';
                      var isFunction = toStr.call(object) === '[object Function]';
                      var isArguments = isArgs(object);
                      var isString = isObject && toStr.call(object) === '[object String]';
                  Severity: Minor
                  Found in release/angular-http-etag.js - About 1 hr to fix

                    Similar blocks of code found in 2 locations. Consider refactoring.
                    Open

                    module.exports = {
                      files: [
                        resolve('node_modules/angular/angular.js'),
                        resolve('node_modules/angular-mocks/angular-mocks.js'),
                        resolve('src/index.js'),
                    Severity: Major
                    Found in .config/karma.config.angular-1.x.js and 1 other location - About 1 hr to fix
                    .config/karma.config.angular-1.5.js on lines 5..17

                    Duplicated Code

                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                    Tuning

                    This issue has a mass of 58.

                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                    Refactorings

                    Further Reading

                    Similar blocks of code found in 2 locations. Consider refactoring.
                    Open

                    module.exports = {
                      files: [
                        resolve('test/angular_1.5/vendor/angular.js'),
                        resolve('test/angular_1.5/vendor/angular-mocks.js'),
                        resolve('src/index.js'),
                    Severity: Major
                    Found in .config/karma.config.angular-1.5.js and 1 other location - About 1 hr to fix
                    .config/karma.config.angular-1.x.js on lines 5..17

                    Duplicated Code

                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                    Tuning

                    This issue has a mass of 58.

                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                    Refactorings

                    Further Reading

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

                      function processHttpConfigEtagValue (httpConfig) {
                        var etagValue = httpConfig.etagCache
                        var etagValueType = typeof etagValue
                        var etagCacheConfig = {}
                    
                    
                    Severity: Minor
                    Found in src/httpDecorator.js - About 1 hr to fix

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

                        function processHttpConfigEtagValue (httpConfig) {
                          var etagValue = httpConfig.etagCache
                          var etagValueType = typeof etagValue
                          var etagCacheConfig = {}
                      
                      
                      Severity: Minor
                      Found in release/angular-http-etag.js - About 1 hr to fix

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

                          function processHttpConfigEtagValue (httpConfig) {
                            var etagValue = httpConfig.etagCache
                            var etagValueType = typeof etagValue
                            var etagCacheConfig = {}
                        
                        
                        Severity: Minor
                        Found in lib/index.js - About 1 hr to fix

                          Identical blocks of code found in 3 locations. Consider refactoring.
                          Open

                                adaptedCache.expireItem = function adaptedCacheUnsetItemCache (itemKey) {
                                  var data = adaptedCache.$getItem(itemKey)
                                  delete data.etagHeader
                                  adaptedCache.$setItem(itemKey, data)
                                }
                          Severity: Major
                          Found in release/angular-http-etag.js and 2 other locations - About 1 hr to fix
                          lib/index.js on lines 299..303
                          src/service.js on lines 164..168

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 55.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Identical blocks of code found in 3 locations. Consider refactoring.
                          Open

                                adaptedCache.expireItem = function adaptedCacheUnsetItemCache (itemKey) {
                                  var data = adaptedCache.$getItem(itemKey)
                                  delete data.etagHeader
                                  adaptedCache.$setItem(itemKey, data)
                                }
                          Severity: Major
                          Found in src/service.js and 2 other locations - About 1 hr to fix
                          lib/index.js on lines 299..303
                          release/angular-http-etag.js on lines 1418..1422

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 55.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Identical blocks of code found in 3 locations. Consider refactoring.
                          Open

                                adaptedCache.expireItem = function adaptedCacheUnsetItemCache (itemKey) {
                                  var data = adaptedCache.$getItem(itemKey)
                                  delete data.etagHeader
                                  adaptedCache.$setItem(itemKey, data)
                                }
                          Severity: Major
                          Found in lib/index.js and 2 other locations - About 1 hr to fix
                          release/angular-http-etag.js on lines 1418..1422
                          src/service.js on lines 164..168

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 55.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Similar blocks of code found in 3 locations. Consider refactoring.
                          Open

                              function processCacheId (cacheId) {
                                var type = typeof cacheId
                                var isDefined = type === 'number' || (type === 'string' && !!cacheId)
                                return isDefined ? cacheId : defaultCacheId
                              }
                          Severity: Major
                          Found in release/angular-http-etag.js and 2 other locations - About 55 mins to fix
                          lib/index.js on lines 358..362
                          src/service.js on lines 223..227

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 54.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Severity
                          Category
                          Status
                          Source
                          Language