tableau-mkt/groucho

View on GitHub

Showing 4 of 6 total issues

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

    Function getActivities has 32 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      groucho.getActivities = function (group) {
        var results = groucho.storage.index(),
            returnVals = [],
            matchable = (group) ? new RegExp("^track." + group + ".", "g") : false,
            record;
    Severity: Minor
    Found in src/utility.js - About 1 hr 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
          Severity
          Category
          Status
          Source
          Language