tableau-mkt/groucho

View on GitHub
src/favorites.js

Summary

Maintainability
B
5 hrs
Test Coverage

Function getFavoriteTerms has 88 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  groucho.getFavoriteTerms = function (vocab, returnAll, threshold) {
    var results = groucho.getActivities('browsing'),
        termProp = groucho.config.taxonomyProperty,
        pages = [],
        returnTerms = {},
Severity: Major
Found in src/favorites.js - About 3 hrs to fix

    Avoid deeply nested control flow statements.
    Open

                if (results[i][termProp].hasOwnProperty(vocab)) {
                  collectTerms(vocab, i);
                }
    Severity: Major
    Found in src/favorites.js - About 45 mins to fix

      Avoid deeply nested control flow statements.
      Open

                  for (vocName in results[i][termProp]) {
                    collectTerms(vocName, i);
                  }
      Severity: Major
      Found in src/favorites.js - About 45 mins to fix

        There are no issues that match your filters.

        Category
        Status