angular/angular-hint

View on GitHub

Showing 82 of 90 total issues

File debug-parse.js has 1509 lines of code (exceeds 250 allowed). Consider refactoring.
Open


'use strict';

////////////////////////////////////

Severity: Major
Found in src/lib/debug-parse.js - About 4 days to fix

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

    module.exports = function $ParseProvider() {
      var cacheDefault = createMap();
      var cacheExpensive = createMap();
    
    
    
    Severity: Minor
    Found in src/lib/debug-parse.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 equals has a Cognitive Complexity of 68 (exceeds 5 allowed). Consider refactoring.
    Open

    function equals(o1, o2) {
      if (o1 === o2) return true;
      if (o1 === null || o2 === null) return false;
      if (o1 !== o1 && o2 !== o2) return true; // NaN === NaN
      var t1 = typeof o1, t2 = typeof o2, length, key, keySet;
    Severity: Minor
    Found in src/lib/debug-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 $ParseProvider has 192 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    module.exports = function $ParseProvider() {
      var cacheDefault = createMap();
      var cacheExpensive = createMap();
    
    
    
    Severity: Major
    Found in src/lib/debug-parse.js - About 7 hrs to fix

      Function copy has a Cognitive Complexity of 49 (exceeds 5 allowed). Consider refactoring.
      Open

      function copy(source, destination, stackSource, stackDest) {
        if (isWindow(source) || isScope(source)) {
          throw ngMinErr('cpws',
            "Can't copy! Making copies of Window or Scope instances is not supported.");
        }
      Severity: Minor
      Found in src/lib/debug-parse.js - About 7 hrs 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 $get has 188 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        this.$get = ['$filter', '$sniffer', function($filter, $sniffer) {
          var $parseOptions = {
                csp: $sniffer.csp,
                expensiveChecks: false
              },
      Severity: Major
      Found in src/lib/debug-parse.js - About 7 hrs to fix

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

        function decorateRootScope($delegate, $parse) {
        
          var perf = window.performance || { now: function () { return 0; } };
        
          var scopes = {},
        Severity: Major
        Found in src/modules/scopes.js - About 7 hrs to fix

          Function forEach has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring.
          Open

          function forEach(obj, iterator, context) {
            var key, length;
            if (obj) {
              if (isFunction(obj)) {
                for (key in obj) {
          Severity: Minor
          Found in src/lib/debug-parse.js - About 4 hrs 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 decorateRootScope has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring.
          Open

          function decorateRootScope($delegate, $parse) {
          
            var perf = window.performance || { now: function () { return 0; } };
          
            var scopes = {},
          Severity: Minor
          Found in src/modules/scopes.js - About 4 hrs 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 cspSafeGetterFn has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring.
          Open

          function cspSafeGetterFn(key0, key1, key2, key3, key4, fullExp, expensiveChecks) {
            ensureSafeMemberName(key0, fullExp);
            ensureSafeMemberName(key1, fullExp);
            ensureSafeMemberName(key2, fullExp);
            ensureSafeMemberName(key3, fullExp);
          Severity: Minor
          Found in src/lib/debug-parse.js - About 4 hrs 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

          prototype has 30 functions (exceeds 20 allowed). Consider refactoring.
          Open

          Parser.prototype = {
            constructor: Parser,
          
            parse: function(text) {
              this.text = text;
          Severity: Minor
          Found in src/lib/debug-parse.js - About 3 hrs to fix

            Function lex has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
            Open

              lex: function(text) {
                this.text = text;
                this.index = 0;
                this.tokens = [];
            
            
            Severity: Minor
            Found in src/lib/debug-parse.js - About 3 hrs 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 functionCall has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring.
            Open

              functionCall: function(fnGetter, contextGetter) {
                var argsFn = [];
                if (this.peekToken().text !== ')') {
                  do {
                    argsFn.push(this.expression());
            Severity: Minor
            Found in src/lib/debug-parse.js - About 2 hrs 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 scopeDescriptor has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
            Open

            function scopeDescriptor (elt, scope) {
              var val,
                  theseTypes = [],
                  noDataDefault = 'scope.$id=' + scope.$id,
                  type;
            Severity: Minor
            Found in src/modules/scopes.js - About 2 hrs 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 copy has 64 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            function copy(source, destination, stackSource, stackDest) {
              if (isWindow(source) || isScope(source)) {
                throw ngMinErr('cpws',
                  "Can't copy! Making copies of Window or Scope instances is not supported.");
              }
            Severity: Major
            Found in src/lib/debug-parse.js - About 2 hrs to fix

              File scopes.js has 269 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              'use strict';
              
              var summarize = require('../lib/summarize-model');
              var debounceOn = require('debounce-on');
              
              
              Severity: Minor
              Found in src/modules/scopes.js - About 2 hrs to fix

                Function bindJQuery has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
                Open

                function bindJQuery() {
                  var originalCleanData;
                
                  if (bindJQueryFired) {
                    return;
                Severity: Minor
                Found in src/lib/debug-parse.js - About 2 hrs 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 statements has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
                Open

                  statements: function() {
                    var statements = [];
                    while (true) {
                      if (this.tokens.length > 0 && !this.peek('}', ')', ';', ']'))
                        statements.push(this.filterChain());
                Severity: Minor
                Found in src/lib/debug-parse.js - About 1 hr 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 readNumber has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
                Open

                  readNumber: function() {
                    var number = '';
                    var start = this.index;
                    while (this.index < this.text.length) {
                      var ch = lowercase(this.text.charAt(this.index));
                Severity: Minor
                Found in src/lib/debug-parse.js - About 1 hr 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 readString has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
                Open

                  readString: function(quote) {
                    var start = this.index;
                    this.index++;
                    var string = '';
                    var rawString = quote;
                Severity: Minor
                Found in src/lib/debug-parse.js - About 1 hr 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