angular/angular-hint

View on GitHub

Showing 90 of 90 total issues

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

    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 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

    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 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 getter has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
    Open

    function getter(obj, path, bindFnToScope) {
      if (!path) return obj;
      var keys = path.split('.');
      var key;
      var lastInstance = obj;
    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 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 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 extend has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
    Open

    function extend(dst) {
      var h = dst.$$hashKey;
    
      for (var i = 1, ii = arguments.length; i < ii; i++) {
        var obj = arguments[i];
    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 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

    Severity
    Category
    Status
    Source
    Language