angular/angular.js

View on GitHub

Showing 2,008 of 4,250 total issues

File numberSymbolsExt.js has 9878 lines of code (exceeds 250 allowed). Consider refactoring.
Open

// Copyright 2011 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/numberSymbolsExt.js - About 1 mo to fix

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

    function $CompileProvider($provide, $$sanitizeUriProvider) {
      var hasDirectives = {},
          Suffix = 'Directive',
          COMMENT_DIRECTIVE_REGEXP = /^\s*directive:\s*([\w-]+)\s+(.*)$/,
          CLASS_DIRECTIVE_REGEXP = /(([\w-]+)(?::([^;]+))?;?)/,
    Severity: Minor
    Found in src/ng/compile.js - About 3 wks 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 IDC_Y has a Cognitive Complexity of 651 (exceeds 5 allowed). Consider refactoring.
    Open

    function IDC_Y(cp) {
      if (0x0030 <= cp && cp <= 0x0039) return true;
      if (0x0041 <= cp && cp <= 0x005A) return true;
      if (cp === 0x005F) return true;
      if (0x0061 <= cp && cp <= 0x007A) return true;
    Severity: Minor
    Found in src/ngParseExt/ucd.js - About 1 wk 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 IDS_Y has a Cognitive Complexity of 557 (exceeds 5 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: Minor
    Found in src/ngParseExt/ucd.js - About 1 wk 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 $RootScopeProvider has a Cognitive Complexity of 462 (exceeds 5 allowed). Consider refactoring.
    Open

    function $RootScopeProvider() {
      var TTL = 10;
      var $rootScopeMinErr = minErr('$rootScope');
      var lastDirtyWatch = null;
      var applyAsyncId = null;
    Severity: Minor
    Found in src/ng/rootScope.js - About 1 wk 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 $CompileProvider has 1774 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function $CompileProvider($provide, $$sanitizeUriProvider) {
      var hasDirectives = {},
          Suffix = 'Directive',
          COMMENT_DIRECTIVE_REGEXP = /^\s*directive:\s*([\w-]+)\s+(.*)$/,
          CLASS_DIRECTIVE_REGEXP = /(([\w-]+)(?::([^;]+))?;?)/,
    Severity: Major
    Found in src/ng/compile.js - About 1 wk to fix

      File datetimeSymbols.js has 3111 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      // Copyright 2011 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/datetimeSymbols.js - About 1 wk to fix

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

            function($injector,   $interpolate,   $exceptionHandler,   $templateRequest,   $parse,
                     $controller,   $rootScope,   $sce,   $animate) {
        
            var SIMPLE_ATTR_NAME = /^\w/;
            var specialAttrHolder = window.document.createElement('div');
        Severity: Major
        Found in src/ng/compile.js - About 1 wk to fix

          Function $AnimateCssProvider has a Cognitive Complexity of 331 (exceeds 5 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: Minor
          Found in src/ngAnimate/animateCss.js - About 6 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

          File numberSymbols.js has 2216 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          // Copyright 2011 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/numberSymbols.js - About 6 days to fix

            File compile.js has 1828 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/ng/compile.js - About 4 days to fix

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

              var $$AnimateQueueProvider = ['$animateProvider', /** @this */ function($animateProvider) {
                var PRE_DIGEST_STATE = 1;
                var RUNNING_STATE = 2;
                var ONE_SPACE = ' ';
              
              
              Severity: Minor
              Found in src/ngAnimate/animateQueue.js - About 4 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

              File parse.js has 1667 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/ng/parse.js - About 4 days to fix

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

                'use strict';
                
                /* global routeToRegExp: false */
                
                /**
                Severity: Major
                Found in src/ngMock/angular-mocks.js - About 3 days to fix

                  Function IDC_Y has 652 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  function IDC_Y(cp) {
                    if (0x0030 <= cp && cp <= 0x0039) return true;
                    if (0x0041 <= cp && cp <= 0x005A) return true;
                    if (cp === 0x005F) return true;
                    if (0x0061 <= cp && cp <= 0x007A) return true;
                  Severity: Major
                  Found in src/ngParseExt/ucd.js - About 3 days to fix

                    Function ngOptionsDirective has a Cognitive Complexity of 156 (exceeds 5 allowed). Consider refactoring.
                    Open

                    var ngOptionsDirective = ['$compile', '$document', '$parse', function($compile, $document, $parse) {
                    
                      function parseOptionsExpression(optionsExp, selectElement, scope) {
                    
                        var match = optionsExp.match(NG_OPTIONS_REGEXP);
                    Severity: Minor
                    Found in src/ng/directive/ngOptions.js - About 3 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

                    File ucd.js has 1213 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    /******************************************************
                     *         Generated file, do not modify              *
                     *                                                    *
                     *****************************************************/
                    "use strict";
                    Severity: Major
                    Found in src/ngParseExt/ucd.js - About 3 days to fix

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

                      function $HttpProvider() {
                        /**
                         * @ngdoc property
                         * @name $httpProvider#defaults
                         * @description
                      Severity: Minor
                      Found in src/ng/http.js - About 3 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 $RootScopeProvider has 593 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      function $RootScopeProvider() {
                        var TTL = 10;
                        var $rootScopeMinErr = minErr('$rootScope');
                        var lastDirtyWatch = null;
                        var applyAsyncId = null;
                      Severity: Major
                      Found in src/ng/rootScope.js - About 2 days to fix

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

                              function($exceptionHandler, $parse, $browser) {
                        
                            function destroyChildScope($event) {
                                $event.currentScope.$$destroyed = true;
                            }
                        Severity: Major
                        Found in src/ng/rootScope.js - About 2 days to fix
                          Severity
                          Category
                          Status
                          Source
                          Language