yoctore/yoctopus-generator

View on GitHub

Showing 179 of 179 total issues

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

    init          : function () {
      // default banner
      this.banner('We are initializing some data. Take a cofee and wait a few moment.');
      // create async process
      var done    = this.async();
Severity: Minor
Found in app/index copie.js - About 1 hr to fix

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

            if (!this.cfg.generate.node) {
              // parse all item
              _.each(defaultObj, function (obj) {
                // add item
                prompts.push(obj);
    Severity: Major
    Found in app/index copie.js and 1 other location - About 1 hr to fix
    app/index.js on lines 677..683

    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 58.

    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

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

            if (!this.cfg.generate.node) {
              // parse all item
              _.each(defaultObj, function (obj) {
                // add item
                prompts.push(obj);
    Severity: Major
    Found in app/index.js and 1 other location - About 1 hr to fix
    app/index copie.js on lines 650..656

    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 58.

    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

    Similar blocks of code found in 6 locations. Consider refactoring.
    Open

    angular.module('<%= name %>')
    .filter('isObject', [ '_', function (_) {
      // default statement
      return function (value) {
        // default statement
    Severity: Major
    Found in app/templates/applications/angular/_filter.js and 5 other locations - About 1 hr to fix
    app/templates/applications/angular/_filter.js on lines 8..15
    app/templates/applications/angular/_filter.js on lines 22..29
    app/templates/applications/angular/_filter.js on lines 141..148
    app/templates/applications/angular/_filter.js on lines 169..176
    app/templates/applications/angular/_filter.js on lines 197..204

    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 57.

    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

    Similar blocks of code found in 6 locations. Consider refactoring.
    Open

    angular.module('<%= name %>')
    .filter('isArray', [ '_', function (_) {
      // default statement
      return function (value) {
        // default statement
    Severity: Major
    Found in app/templates/applications/angular/_filter.js and 5 other locations - About 1 hr to fix
    app/templates/applications/angular/_filter.js on lines 8..15
    app/templates/applications/angular/_filter.js on lines 22..29
    app/templates/applications/angular/_filter.js on lines 141..148
    app/templates/applications/angular/_filter.js on lines 183..190
    app/templates/applications/angular/_filter.js on lines 197..204

    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 57.

    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

    Similar blocks of code found in 6 locations. Consider refactoring.
    Open

    angular.module('<%= name %>')
    .filter('ucfirst', [ '_', function (_) {
      // default statement
      return function (value) {
        // return value
    Severity: Major
    Found in app/templates/applications/angular/_filter.js and 5 other locations - About 1 hr to fix
    app/templates/applications/angular/_filter.js on lines 8..15
    app/templates/applications/angular/_filter.js on lines 141..148
    app/templates/applications/angular/_filter.js on lines 169..176
    app/templates/applications/angular/_filter.js on lines 183..190
    app/templates/applications/angular/_filter.js on lines 197..204

    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 57.

    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

    Similar blocks of code found in 6 locations. Consider refactoring.
    Open

    angular.module('<%= name %>')
    .filter('htmlsafe', [ '$sce', function ($sce) {
      // default statement
      return function (value) {
        // trust as html
    Severity: Major
    Found in app/templates/applications/angular/_filter.js and 5 other locations - About 1 hr to fix
    app/templates/applications/angular/_filter.js on lines 22..29
    app/templates/applications/angular/_filter.js on lines 141..148
    app/templates/applications/angular/_filter.js on lines 169..176
    app/templates/applications/angular/_filter.js on lines 183..190
    app/templates/applications/angular/_filter.js on lines 197..204

    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 57.

    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

    Similar blocks of code found in 6 locations. Consider refactoring.
    Open

    angular.module('<%= name %>')
    .filter('isNumber', [ '_', function (_) {
      // default statement
      return function (value) {
        // default statement
    Severity: Major
    Found in app/templates/applications/angular/_filter.js and 5 other locations - About 1 hr to fix
    app/templates/applications/angular/_filter.js on lines 8..15
    app/templates/applications/angular/_filter.js on lines 22..29
    app/templates/applications/angular/_filter.js on lines 169..176
    app/templates/applications/angular/_filter.js on lines 183..190
    app/templates/applications/angular/_filter.js on lines 197..204

    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 57.

    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

    Similar blocks of code found in 6 locations. Consider refactoring.
    Open

    angular.module('<%= name %>')
    .filter('isEmpty', [ '_', function (_) {
      // default statement
      return function (value) {
        // default statement
    Severity: Major
    Found in app/templates/applications/angular/_filter.js and 5 other locations - About 1 hr to fix
    app/templates/applications/angular/_filter.js on lines 8..15
    app/templates/applications/angular/_filter.js on lines 22..29
    app/templates/applications/angular/_filter.js on lines 141..148
    app/templates/applications/angular/_filter.js on lines 169..176
    app/templates/applications/angular/_filter.js on lines 183..190

    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 57.

    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

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

        this.banner = function (message) {
          // process banner
          logger.banner([ '[', this.cfg.name, '] -', message].join(' '));
        };
    Severity: Major
    Found in app/index.js and 1 other location - About 1 hr to fix
    app/index copie.js on lines 188..191

    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 55.

    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

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

        this.banner = function (message) {
          // process banner
          logger.banner([ '[', this.cfg.name, '] -', message].join(' '));
        };
    Severity: Major
    Found in app/index copie.js and 1 other location - About 1 hr to fix
    app/index.js on lines 209..212

    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 55.

    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

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

      core.start().then(function () {
    
      /********************************************
       *              YOUR CODE HERE              *
       *******************************************/
    Severity: Minor
    Found in app/templates/applications/node/_app.js and 1 other location - About 50 mins to fix
    app/templates/applications/node/_app.js on lines 11..30

    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 51.

    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

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

    core.init().then(function () {
      // Init succeed start your app
      core.start().then(function () {
    
      /********************************************
    Severity: Minor
    Found in app/templates/applications/node/_app.js and 1 other location - About 50 mins to fix
    app/templates/applications/node/_app.js on lines 13..24

    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 51.

    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

    Function robots has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
    Open

    exports.robots = function(req, res) {
      // default data
      var data = {};
    
      // try process
    Severity: Minor
    Found in app/templates/applications/node/app/controllers/_index.js - About 45 mins to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Avoid deeply nested control flow statements.
    Open

                        if (_.last(this.folders[type]) === folder) {
                          // start a timeout here
                          var timeout = setTimeout(function () {
                            // stop spinner
                            this.spinner.stop(true);
    Severity: Major
    Found in app/index copie.js - About 45 mins to fix

      Function api has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
      Open

      exports.api = function (req, res) {
        // Retrieve api information
        var api      = this.get('config').config.api;
        // Retrieve app information
        var app      = this.get('config').config.app;
      Severity: Minor
      Found in app/templates/applications/node/app/controllers/_.request.js - About 45 mins to fix

      Cognitive Complexity

      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

      A method's cognitive complexity is based on a few simple rules:

      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
      • Code is considered more complex for each "break in the linear flow of the code"
      • Code is considered more complex when "flow breaking structures are nested"

      Further reading

      Avoid deeply nested control flow statements.
      Open

                          if (_.last(this.folders[type]) === folder) {
                            // start a timeout here
                            var timeout = setTimeout(function () {
                              // stop spinner
                              this.spinner.stop(true);
      Severity: Major
      Found in app/index.js - About 45 mins to fix

        Function $get has 5 arguments (exceeds 4 allowed). Consider refactoring.
        Open

            function ($http, appConstants, $rootScope, $q, logService) {
        Severity: Minor
        Found in app/templates/applications/angular/_provider.js - About 35 mins to fix

          Similar blocks of code found in 3 locations. Consider refactoring.
          Open

              log : function (message) {
                // only if debug is activated
                if (appConstants.keys().debug) {
                  // default log process
                  $log.log(message);
          Severity: Minor
          Found in app/templates/applications/angular/_services.js and 2 other locations - About 35 mins to fix
          app/templates/applications/angular/_services.js on lines 48..54
          app/templates/applications/angular/_services.js on lines 82..88

          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 46.

          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

          Similar blocks of code found in 3 locations. Consider refactoring.
          Open

              info : function (message) {
                // only if debug is activated
                if (appConstants.keys().debug) {
                  // default log process
                  $log.info(message);
          Severity: Minor
          Found in app/templates/applications/angular/_services.js and 2 other locations - About 35 mins to fix
          app/templates/applications/angular/_services.js on lines 38..44
          app/templates/applications/angular/_services.js on lines 82..88

          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 46.

          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