angular/angular.js

View on GitHub

Showing 2,008 of 4,250 total issues

Function IDS_Y has 556 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function IDS_Y(cp) {
  if (0x0041 <= cp && cp <= 0x005A) return true;
  if (0x0061 <= cp && cp <= 0x007A) return true;
  if (cp === 0x00AA) return true;
  if (cp === 0x00B5) return true;
Severity: Major
Found in src/ngParseExt/ucd.js - About 2 days to fix

    Function $SanitizeProvider has a Cognitive Complexity of 120 (exceeds 5 allowed). Consider refactoring.
    Open

    function $SanitizeProvider() {
      var hasBeenInstantiated = false;
      var svgEnabled = false;
    
      this.$get = ['$$sanitizeUri', function($$sanitizeUri) {
    Severity: Minor
    Found in src/ngSanitize/sanitize.js - About 2 days to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Function $$AnimateQueueProvider has 479 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    var $$AnimateQueueProvider = ['$animateProvider', /** @this */ function($animateProvider) {
      var PRE_DIGEST_STATE = 1;
      var RUNNING_STATE = 2;
      var ONE_SPACE = ' ';
    
    
    Severity: Major
    Found in src/ngAnimate/animateQueue.js - About 2 days to fix

      Function $AnimateCssProvider has 470 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      var $AnimateCssProvider = ['$animateProvider', /** @this */ function($animateProvider) {
      
        this.$get = ['$window', '$$jqLite', '$$AnimateRunner', '$timeout', '$$animateCache',
                     '$$forceReflow', '$sniffer', '$$rAFScheduler', '$$animateQueue',
             function($window,   $$jqLite,   $$AnimateRunner,   $timeout,   $$animateCache,
      Severity: Major
      Found in src/ngAnimate/animateCss.js - About 2 days to fix

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

               function($window,   $$jqLite,   $$AnimateRunner,   $timeout,   $$animateCache,
                        $$forceReflow,   $sniffer,   $$rAFScheduler, $$animateQueue) {
        
            var applyAnimationClasses = applyAnimationClassesFactory($$jqLite);
        
        
        Severity: Major
        Found in src/ngAnimate/animateCss.js - About 2 days to fix

          Function $RouteProvider has a Cognitive Complexity of 111 (exceeds 5 allowed). Consider refactoring.
          Open

          function $RouteProvider() {
            isArray = angular.isArray;
            isObject = angular.isObject;
            isDefined = angular.isDefined;
            noop = angular.noop;
          Severity: Minor
          Found in src/ngRoute/route.js - About 2 days to fix

          Cognitive Complexity

          Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

          A method's cognitive complexity is based on a few simple rules:

          • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
          • Code is considered more complex for each "break in the linear flow of the code"
          • Code is considered more complex when "flow breaking structures are nested"

          Further reading

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

          module.exports = function(grunt) {
          
            // this loads all the node_modules that start with `grunt-` as plugins
            require('load-grunt-tasks')(grunt);
          
          
          Severity: Major
          Found in Gruntfile.js - About 2 days to fix

            Function init has 409 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                return function init(element, initialOptions) {
                  // all of the animation functions should create
                  // a copy of the options data, however, if a
                  // parent service has already created a copy then
                  // we should stick to using that
            Severity: Major
            Found in src/ngAnimate/animateCss.js - About 2 days to fix

              File Angular.js has 834 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              'use strict';
              
              /* We need to tell ESLint what variables are being exported */
              /* exported
                angular,
              Severity: Major
              Found in src/Angular.js - About 2 days to fix

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

                       function($$rAF,   $rootScope,   $rootElement,   $document,   $$Map,
                                $$animation,   $$AnimateRunner,   $templateRequest,   $$jqLite,   $$forceReflow,
                                $$isDocumentHidden) {
                
                    var activeAnimationsLookup = new $$Map();
                Severity: Major
                Found in src/ngAnimate/animateQueue.js - About 1 day to fix

                  Function ngRepeatDirective has a Cognitive Complexity of 99 (exceeds 5 allowed). Consider refactoring.
                  Open

                  var ngRepeatDirective = ['$parse', '$animate', '$compile', function($parse, $animate, $compile) {
                    var NG_REMOVED = '$$NG_REMOVED';
                    var ngRepeatMinErr = minErr('ngRepeat');
                  
                    var updateScope = function(scope, index, valueIdentifier, value, keyIdentifier, key, arrayLength) {
                  Severity: Minor
                  Found in src/ng/directive/ngRepeat.js - About 1 day to fix

                  Cognitive Complexity

                  Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                  A method's cognitive complexity is based on a few simple rules:

                  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                  • Code is considered more complex for each "break in the linear flow of the code"
                  • Code is considered more complex when "flow breaking structures are nested"

                  Further reading

                  Function $ParseProvider has a Cognitive Complexity of 98 (exceeds 5 allowed). Consider refactoring.
                  Open

                  function $ParseProvider() {
                    var cache = createMap();
                    var literals = {
                      'true': true,
                      'false': false,
                  Severity: Minor
                  Found in src/ng/parse.js - About 1 day to fix

                  Cognitive Complexity

                  Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                  A method's cognitive complexity is based on a few simple rules:

                  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                  • Code is considered more complex for each "break in the linear flow of the code"
                  • Code is considered more complex when "flow breaking structures are nested"

                  Further reading

                  Function $InterpolateProvider has a Cognitive Complexity of 95 (exceeds 5 allowed). Consider refactoring.
                  Open

                  function $InterpolateProvider() {
                    var startSymbol = '{{';
                    var endSymbol = '}}';
                  
                    /**
                  Severity: Minor
                  Found in src/ng/interpolate.js - About 1 day to fix

                  Cognitive Complexity

                  Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                  A method's cognitive complexity is based on a few simple rules:

                  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                  • Code is considered more complex for each "break in the linear flow of the code"
                  • Code is considered more complex when "flow breaking structures are nested"

                  Further reading

                  Function createHttpBackendMock has a Cognitive Complexity of 93 (exceeds 5 allowed). Consider refactoring.
                  Open

                  function createHttpBackendMock($rootScope, $timeout, $delegate, $browser) {
                    var definitions = [],
                        expectations = [],
                        matchLatestDefinition = false,
                        responses = [],
                  Severity: Minor
                  Found in src/ngMock/angular-mocks.js - About 1 day to fix

                  Cognitive Complexity

                  Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                  A method's cognitive complexity is based on a few simple rules:

                  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                  • Code is considered more complex for each "break in the linear flow of the code"
                  • Code is considered more complex when "flow breaking structures are nested"

                  Further reading

                  Function applyDirectivesToNode has 364 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      function applyDirectivesToNode(directives, compileNode, templateAttrs, transcludeFn,
                                                     jqCollection, originalReplaceDirective, preLinkFns, postLinkFns,
                                                     previousCompileContext) {
                        previousCompileContext = previousCompileContext || {};
                  
                  
                  Severity: Major
                  Found in src/ng/compile.js - About 1 day to fix

                    File jqLite.js has 759 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    'use strict';
                    
                    /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
                     *     Any commits to this file should be reviewed with security in mind.  *
                     *   Changes to this file can potentially create security vulnerabilities. *
                    Severity: Major
                    Found in src/jqLite.js - About 1 day to fix

                      File pluralRules.js has 744 lines of code (exceeds 250 allowed). Consider refactoring.
                      Open

                      // Copyright 2012 The Closure Library Authors. All Rights Reserved.
                      //
                      // Licensed under the Apache License, Version 2.0 (the "License");
                      // you may not use this file except in compliance with the License.
                      // You may obtain a copy of the License at
                      Severity: Major
                      Found in i18n/closure/pluralRules.js - About 1 day to fix

                        Function $$AnimationProvider has 333 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        var $$AnimationProvider = ['$animateProvider', /** @this */ function($animateProvider) {
                          var NG_ANIMATE_REF_ATTR = 'ng-animate-ref';
                        
                          var drivers = this.drivers = [];
                        
                        
                        Severity: Major
                        Found in src/ngAnimate/animation.js - About 1 day to fix

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

                                 function($$jqLite,   $rootScope,   $injector,   $$AnimateRunner,   $$Map,   $$rAFScheduler, $$animateCache) {
                          
                              var animationQueue = [];
                              var applyAnimationClasses = applyAnimationClassesFactory($$jqLite);
                          
                          
                          Severity: Major
                          Found in src/ngAnimate/animation.js - About 1 day to fix

                            Function $CacheFactoryProvider has a Cognitive Complexity of 78 (exceeds 5 allowed). Consider refactoring.
                            Open

                            function $CacheFactoryProvider() {
                            
                              this.$get = function() {
                                var caches = {};
                            
                            
                            Severity: Minor
                            Found in src/ng/cacheFactory.js - About 1 day to fix

                            Cognitive Complexity

                            Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                            A method's cognitive complexity is based on a few simple rules:

                            • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                            • Code is considered more complex for each "break in the linear flow of the code"
                            • Code is considered more complex when "flow breaking structures are nested"

                            Further reading

                            Severity
                            Category
                            Status
                            Source
                            Language