angular/angular-hint

View on GitHub

Showing 82 of 90 total issues

Avoid too many return statements within this function.
Open

              !isFunction(o2[key])) return false;
Severity: Major
Found in src/lib/debug-parse.js - About 30 mins to fix

    Avoid too many return statements within this function.
    Open

              return true;
    Severity: Major
    Found in src/lib/debug-parse.js - About 30 mins to fix

      Avoid too many return statements within this function.
      Open

          if (pathVal == null) { onUndefined([key0, key1, key2, key3].join('.')); return };
      Severity: Major
      Found in src/lib/debug-parse.js - About 30 mins to fix

        Avoid too many return statements within this function.
        Open

            if (pathVal == null) { onUndefined([key0, key1, key2].join('.')); return };
        Severity: Major
        Found in src/lib/debug-parse.js - About 30 mins to fix

          Avoid too many return statements within this function.
          Open

                    if (!equals(o1[key], o2[key])) return false;
          Severity: Major
          Found in src/lib/debug-parse.js - About 30 mins to fix

            Avoid too many return statements within this function.
            Open

                if (!key3) return pathVal;
            Severity: Major
            Found in src/lib/debug-parse.js - About 30 mins to fix

              Avoid too many return statements within this function.
              Open

                  if (!key4) return pathVal;
              Severity: Major
              Found in src/lib/debug-parse.js - About 30 mins to fix

                Avoid too many return statements within this function.
                Open

                        return true;
                Severity: Major
                Found in src/lib/debug-parse.js - About 30 mins to fix

                  Avoid too many return statements within this function.
                  Open

                    return false;
                  Severity: Major
                  Found in src/lib/debug-parse.js - About 30 mins to fix

                    Avoid too many return statements within this function.
                    Open

                            return equals(o1.getTime(), o2.getTime());
                    Severity: Major
                    Found in src/lib/debug-parse.js - About 30 mins to fix

                      Avoid too many return statements within this function.
                      Open

                          return pathVal;
                      Severity: Major
                      Found in src/lib/debug-parse.js - About 30 mins to fix

                        Avoid too many return statements within this function.
                        Open

                                return o1.toString() == o2.toString();
                        Severity: Major
                        Found in src/lib/debug-parse.js - About 30 mins to fix

                          Avoid too many return statements within this function.
                          Open

                                  if (!isDate(o2)) return false;
                          Severity: Major
                          Found in src/lib/debug-parse.js - About 30 mins to fix

                            Function getFunctionNames has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                            Open

                            var getFunctionNames = function(str) {
                              if (typeof str !== 'string') {
                                return [];
                              }
                              // There are still a bunch of corner cases here where we aren't going to be able to handle
                            Severity: Minor
                            Found in src/modules/events.js - About 25 mins 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 summarizeProperty has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                            Open

                            function summarizeProperty (obj) {
                              return obj instanceof Array ?
                                  { '~array-length': obj.length } :
                                obj === null ?
                                  null :
                            Severity: Minor
                            Found in src/lib/summarize-model.js - About 25 mins 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 a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                            Open

                            module.exports = function(loadedModules) {
                              var undeclaredModules = [];
                              for(var module in loadedModules) {
                                var cModule = getModule(module, true);
                                if(!cModule) {
                            Severity: Minor
                            Found in src/modules/angular-hint-modules/getUndeclaredModules.js - About 25 mins 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 unary has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                            Open

                              unary: function() {
                                var token;
                                if (this.expect('+')) {
                                  return this.primary();
                                } else if ((token = this.expect('-'))) {
                            Severity: Minor
                            Found in src/lib/debug-parse.js - About 25 mins 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 bind has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                            Open

                            function bind(self, fn) {
                              var curryArgs = arguments.length > 2 ? sliceArgs(arguments, 2) : [];
                              if (isFunction(fn) && !(fn instanceof RegExp)) {
                                return curryArgs.length
                                  ? function() {
                            Severity: Minor
                            Found in src/lib/debug-parse.js - About 25 mins 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 a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                            Open

                            module.exports = function(createdModules) {
                              var unusedModules = [];
                              for(var module in createdModules) {
                                if(!getModule(module)) {
                                  var cModule = createdModules[module],
                            Severity: Minor
                            Found in src/modules/angular-hint-modules/getUnusedModules.js - About 25 mins 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 isArrayLike has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                            Open

                            function isArrayLike(obj) {
                              if (obj == null || isWindow(obj)) {
                                return false;
                              }
                            
                            
                            Severity: Minor
                            Found in src/lib/debug-parse.js - About 25 mins 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