CleverStack/cleverstack-cli

View on GitHub

Showing 60 of 84 total issues

Function Services has 39 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  function Services() {
    this.help      = 'Lists all of the services within this project';
    this.services  = {};
    this.table     = new Table({
      head: [
Severity: Minor
Found in lib/repl/commands/services.js - About 1 hr to fix

    Function installPeerModules has 39 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function installPeerModules(project, dependencies, projectDir) {
      var originalCwd = process.cwd();
    
      return new Promise(function(resolve, reject) {
        projectDir    = typeof projectDir !== 'undefined' ? projectDir : project;
    Severity: Minor
    Found in lib/util/dependencies.js - About 1 hr to fix

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

      module.exports = function(Table, env, lib, repl, local) {
        function Commands() {
          this.help    = 'Lists all of the REPL commands';
          this.aliases = ['h', 'help'];
          this.table   = new Table({
      Severity: Minor
      Found in lib/repl/commands/commands.js - About 1 hr to fix

        Function get has 37 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        var get = exports.get = function(pkg, url, dir) {
          if (arguments.length < 3) {
            var name = pkg.name.split('@')[ 0 ];
            dir = url;
            url = 'https://github.com/' + pkg.owner + '/' + name + '/archive/master.tar.gz';
        Severity: Minor
        Found in lib/packages.js - About 1 hr to fix

          Function runTask has 37 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          function runTask(projectFolder, command) {
            var args       = [].slice.call(arguments, 1);
          
            return new Promise(function(resolve, reject) {
              var cmd      = !isWin ? 'grunt' : 'grunt.cmd'
          Severity: Minor
          Found in lib/util/grunt.js - About 1 hr to fix

            Function ReplHistory has 36 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              function ReplHistory() {
                this.help    = 'Shows command history';
            
                var maxSize  = 10240
                  , lastLine = null
            Severity: Minor
            Found in lib/repl/commands/history.js - About 1 hr to fix

              Function installFrontendModules has 34 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              var installFrontendModules = exports.installFrontendModules = function(location, packages) {
                return new Promise(function(resolve, reject) {
                  async.eachSeries(
                    packages,
                    function(pkg, next) {
              Severity: Minor
              Found in lib/packages.js - About 1 hr to fix

                Function generateRun has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                function generateRun(projects, tmpls, names, fn) {
                  async.each(
                    projects,
                    function(project, next) {
                      generator.fs
                Severity: Minor
                Found in lib/generator.js - About 1 hr to fix

                  Function installWithBower has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  exports.installWithBower = function(location, packages) {
                    return new Promise(function(resolve, reject) {
                      async.each(
                        packages,
                        function(pkg, next) {
                  Severity: Minor
                  Found in lib/packages.js - About 1 hr to fix

                    Function initBar has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    exports.initBar = function() {
                      if (undefined === bar) {
                        bar = require('node-status');
                        bar.clear();
                    
                    
                    Severity: Minor
                    Found in lib/utils.js - About 1 hr to fix

                      Function generateScaffold has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      function generateScaffold(project, name, filterOut, fn) {
                        var _path = path.join(__dirname, '..', 'templates', project.name)
                          , walk  = require('findit')(_path)
                          , dirs  = []
                          , files = []
                      Severity: Minor
                      Found in lib/generator.js - About 1 hr to fix

                        Function bower has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        var searchBower = exports.bower = function(query) {
                          return new Promise(function(resolve) {
                            var pkg = query.split('@');
                        
                            _pkg.getJSON({
                        Severity: Minor
                        Found in lib/search.js - About 1 hr to fix

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

                          function listBower() {
                            return new Promise(function(resolve) {
                              var repos = [];
                          
                              utils.info('    Searching Bower...');
                          Severity: Minor
                          Found in lib/search.js - About 1 hr to fix

                            Function installNpmDependencies has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                    function installNpmDependencies(callback) {
                                      var opts = {cwd: moduleDir, env: process.env}
                                        , args = ['install', '--prefix', projectFolder].concat(deps)
                                        , cmd  = !isWin ? 'npm' : 'npm.cmd';
                            
                            
                            Severity: Minor
                            Found in lib/project.js - About 1 hr to fix

                              Function runDBMigrations has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              function runDBMigrations(projectFolder) {
                                lib.utils.warn('Running database migrations...');
                              
                                return new Promise(function(resolve, reject) {
                                  var env        = process.env
                              Severity: Minor
                              Found in lib/util/grunt.js - About 1 hr to fix

                                Function get has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                var get = exports.get = function( useCWD, fn ) {
                                  return new Promise( function( resolve, reject ) {
                                    if ( typeof useCWD === 'function' ) {
                                      fn      = useCWD;
                                      useCWD  = false;
                                Severity: Minor
                                Found in lib/util/locations.js - About 1 hr to fix

                                  Function checkFiles has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                  exports.checkFiles = function(project, dirs, tmpls, names) {
                                    return new Promise(function(resolve, reject) {
                                      var found = false;
                                  
                                      async.each(
                                  Severity: Minor
                                  Found in lib/generate/fs.js - About 1 hr to fix

                                    Function addPeerDependenciesToMain has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                    function addPeerDependenciesToMain(backendPath) {
                                      return new Promise(function(resolve, reject) {
                                        var pkgPath      = path.join(backendPath.moduleDir, 'package.json')
                                          , projectPkg   = require(pkgPath)
                                          , dependencies = {}
                                    Severity: Minor
                                    Found in lib/util/dependencies.js - About 1 hr to fix

                                      Function scaffold has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                      module.exports.scaffold = function(name, filterOut, fn) {
                                        name      = Array.isArray(name) ? name : [ name ];
                                        filterOut = Array.isArray(filterOut) ? filterOut : [];
                                      
                                        // Just for easability, we'll add an 's' to the end of the filters to cover a quasi-plural form
                                      Severity: Minor
                                      Found in lib/generator.js - About 1 hr to fix

                                        Function installWithNpm has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                        exports.installWithNpm = function(location, packages) {
                                          return new Promise(function(resolve, reject) {
                                            async.each(
                                              packages,
                                              function(pkg, next) {
                                        Severity: Minor
                                        Found in lib/packages.js - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language