codenautas/dir-info

View on GitHub

Showing 7 of 7 total issues

Function getInfo has 160 lines of code (exceeds 25 allowed). Consider refactoring.
Open

dirInfo.getInfo = function getInfo(path, opts){
    opts = opts || {};
    var info={ origin:null };
    return Promise.resolve().then(function(){
        if(!path) { throw new Error('null path'); }
Severity: Major
Found in dir-info.js - About 6 hrs to fix

    Avoid deeply nested control flow statements.
    Open

                                        if(resRemote.stdout.match(/local out of date/)) {
                                            info.syncPending = true;
                                        }             
    Severity: Major
    Found in dir-info.js - About 45 mins to fix

      Avoid deeply nested control flow statements.
      Open

                                          for(var prop in o) { if (o.hasOwnProperty(prop)) { return true; } }
      Severity: Major
      Found in dir-info.js - About 45 mins to fix

        Avoid deeply nested control flow statements.
        Open

                                        if(hasUpdates(npmres)) {
                                            info.isOutdated = true;
                                        }
        Severity: Major
        Found in dir-info.js - About 45 mins to fix

          Avoid deeply nested control flow statements.
          Open

                                              if(info.isGitlab) {
                                                  if(resRemote.stdout.match(/fast-forwardable/)) {
                                                      info.pushPending = true;
                                                  }
                                              }
          Severity: Major
          Found in dir-info.js - About 45 mins to fix

            Avoid deeply nested control flow statements.
            Open

                                                if(rst !== "") { info.pushPending = true; }
            Severity: Major
            Found in dir-info.js - About 45 mins to fix

              Avoid deeply nested control flow statements.
              Open

                                              if(fullPath.indexOf(Path.basename(path))==-1){
                                                  continue;
                                              }
              Severity: Major
              Found in dir-info.js - About 45 mins to fix
                Severity
                Category
                Status
                Source
                Language