ketilovre/roam

View on GitHub

Showing 5 of 5 total issues

Function exports has 106 lines of code (exceeds 25 allowed). Consider refactoring.
Open

module.exports = function(grunt) {
  "use strict";

  require('time-grunt')(grunt);

Severity: Major
Found in Gruntfile.js - About 4 hrs to fix

    Function shallowSearch has 27 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      function shallowSearch(identifier, value, exitEarly) {
        var current, memory = [];
    
        if (!(value instanceof Array) && value.hasOwnProperty(identifier)) {
          memory.push(value[identifier]);
    Severity: Minor
    Found in src/roam.js - About 1 hr to fix

      Avoid deeply nested control flow statements.
      Open

                for (var prop in memory) {
                  if (memory.hasOwnProperty(prop)) {
                    result = result.concat(deepSearch(segment.identifier, memory[prop], exitEarly));
                  }
                }
      Severity: Major
      Found in src/roam.js - About 45 mins to fix

        Avoid deeply nested control flow statements.
        Open

                    if (current[j].hasOwnProperty(identifier)) {
                      memory.push(current[j][identifier]);
                      if (exitEarly) {
                        break outer;
                      }
        Severity: Major
        Found in src/roam.js - About 45 mins to fix

          Avoid deeply nested control flow statements.
          Open

                      if (prop !== identifier && json[prop] !== null && typeof json[prop] === 'object') {
                        innerLoop(json[prop]);
                      }
          Severity: Major
          Found in src/roam.js - About 45 mins to fix
            Severity
            Category
            Status
            Source
            Language