CleverStack/cleverstack-cli

View on GitHub

Showing 84 of 84 total issues

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

module.exports = function(env, lib, repl, local) {
  function ReplHistory() {
    this.help    = 'Shows command history';

    var maxSize  = 10240
Severity: Minor
Found in lib/repl/commands/history.js - About 1 hr to fix

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

    module.exports = function(Table, env, lib, repl, local) {
      function Modules() {
        this.help  = 'Lists all of the modules within this project';
        this.table = new Table({
          head: [
    Severity: Minor
    Found in lib/repl/commands/modules.js - About 1 hr to fix

      Function Models has 40 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

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

        Function npmRegistry has 40 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        var searchNPMRegistry = exports.npmRegistry = function(queries) {
          return new Promise(function(resolve, reject) {
            var repos = [];
        
            async.each(
        Severity: Minor
        Found in lib/search.js - About 1 hr to fix

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

          module.exports = function (thePath, program, cmd, args) {
            if (arguments.length < 4) {
              args    = cmd;
              cmd     = program;
              program = require(path.join(__dirname, 'program'));
          Severity: Minor
          Found in lib/command.js - About 1 hr to fix

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

            exports.aggregate = function(args) {
              return new Promise(function(resolve, reject) {
                var all = [];
            
                utils.info('  Searching for modules...');
            Severity: Minor
            Found in lib/search.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 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 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 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 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 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

                                        Identical blocks of code found in 2 locations. Consider refactoring.
                                        Open

                                                  if (!!program.verbose) {
                                                    readline
                                                      .createInterface({
                                                        input    : posixProc.stdout,
                                                        terminal : false
                                        Severity: Major
                                        Found in lib/project.js and 1 other location - About 1 hr to fix
                                        lib/util/bower.js on lines 61..70

                                        Duplicated Code

                                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                        Tuning

                                        This issue has a mass of 60.

                                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                        Refactorings

                                        Further Reading

                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language