yoctore/yoctopus-generator

View on GitHub

Showing 179 of 179 total issues

Function constructor has 121 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  constructor   :  function () {
    // Calling the super constructor is important so our generator is correctly set up
    generators.Base.apply(this, arguments);
    /**
     * Current grunt file editor. we dont use yeaoman generator beacuse
Severity: Major
Found in app/index.js - About 4 hrs to fix

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

        openSourceProject                 : function () {
          // create an async process
          var done = this.async();
          // banner process
          this.banner('Now tell us if this project will be open source in the future');
    Severity: Major
    Found in app/index copie.js and 1 other location - About 4 hrs to fix
    app/index.js on lines 440..458

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

    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

        openSourceProject                 : function () {
          // create an async process
          var done = this.async();
          // banner process
          this.banner('Now tell us if this project will be open source in the future');
    Severity: Major
    Found in app/index.js and 1 other location - About 4 hrs to fix
    app/index copie.js on lines 414..432

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

    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 bowerBasePackage has 104 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        bowerBasePackage                  : function () {
          // process node package ?
          if (this.cfg.generate.angular) {
            // banner message
            this.banner('Now tell us some informations about your AngularJS configuration.');
    Severity: Major
    Found in app/index.js - About 4 hrs to fix

      Function bowerBasePackage has 103 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          bowerBasePackage                  : function () {
            // process node package ?
            if (this.cfg.generate.angular) {
              // banner message
              this.banner('Now tell us some informations about your AngularJS configuration.');
      Severity: Major
      Found in app/index copie.js - About 4 hrs to fix

        Function constructor has 100 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          constructor   :  function () {
            // Calling the super constructor is important so our generator is correctly set up
            generators.Base.apply(this, arguments);
            /**
             * Current grunt file editor. we dont use yeaoman generator beacuse
        Severity: Major
        Found in app/index copie.js - About 4 hrs to fix

          File _services.js has 326 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          'use strict';
          
          /**
           * A Logger utility service
           *
          Severity: Minor
          Found in app/templates/applications/angular/_services.js - About 3 hrs to fix

            Function nodeBasePackage has 90 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                nodeBasePackage                   : function () {
                  // process node package ?
                  if (this.cfg.generate.node) {
                    // banner message
                    this.banner('Now tell us some informations about your NodeJs configuration.');
            Severity: Major
            Found in app/index.js - About 3 hrs to fix

              Function nodeBasePackage has 90 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  nodeBasePackage                   : function () {
                    // process node package ?
                    if (this.cfg.generate.node) {
                      // banner message
                      this.banner('Now tell us some informations about your NodeJs configuration.');
              Severity: Major
              Found in app/index copie.js - About 3 hrs to fix

                Function generateGruntFile has 88 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    generateGruntFile   : function () {
                      // create async process
                      var done = this.async();
                      // default config array
                      var list = {};
                Severity: Major
                Found in app/index.js - About 3 hrs to fix

                  Function generateGruntFile has 88 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      generateGruntFile   : function () {
                        // create async process
                        var done = this.async();
                        // default config array
                        var list = {};
                  Severity: Major
                  Found in app/index copie.js - About 3 hrs to fix

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

                        this.prefixPath = function (path) {
                          // is debug ?
                          if (this.cfg.debug) {
                            // normalize process
                            return this.normalizePath([ this.destinationRoot(), '/debug', path ].join('/'));
                    Severity: Major
                    Found in app/index copie.js and 1 other location - About 3 hrs to fix
                    app/index.js on lines 174..183

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

                    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.prefixPath = function (path) {
                          // is debug ?
                          if (this.cfg.debug) {
                            // normalize process
                            return this.normalizePath([ this.destinationRoot(), '/debug', path ].join('/'));
                    Severity: Major
                    Found in app/index.js and 1 other location - About 3 hrs to fix
                    app/index copie.js on lines 153..162

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

                    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

                            try {
                              // merge data
                              _.merge(config, JSON.parse(fs.readFileSync(file)));
                            } catch (e) {
                              // log error
                    Severity: Major
                    Found in app/templates/applications/node/app/controllers/_config.js and 1 other location - About 3 hrs to fix
                    app/templates/applications/node/app/controllers/_config.js on lines 58..69

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

                    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

                            try {
                              // merge with env config
                              _.merge(config, JSON.parse(fs.readFileSync(replace)));
                            } catch (e) {
                              // log error
                    Severity: Major
                    Found in app/templates/applications/node/app/controllers/_config.js and 1 other location - About 3 hrs to fix
                    app/templates/applications/node/app/controllers/_config.js on lines 37..48

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

                    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

                          } else {
                            // load 
                            appTranslate.load(lang.key).then(function (langs) {
                              // resolve
                              deferred.resolve(langs);
                    Severity: Major
                    Found in app/templates/applications/angular/_factory.js and 1 other location - About 3 hrs to fix
                    app/templates/applications/angular/_factory.js on lines 44..56

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

                    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

                          $rootScope.$on('$configLoadSuccess', function (event, data) {
                            // load
                            appTranslate.load(lang.key).then(function (langs) {
                              // resolve
                              deferred.resolve(langs);
                    Severity: Major
                    Found in app/templates/applications/angular/_factory.js and 1 other location - About 3 hrs to fix
                    app/templates/applications/angular/_factory.js on lines 29..41

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

                    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 packages has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring.
                    Open

                        packages : function () {
                          // banner message
                          this.banner('We will install needed packages');
                          // process install for each type
                          _.each([ 'node', 'angular'], function (type) {
                    Severity: Minor
                    Found in app/index.js - About 3 hrs 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

                    Function packages has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring.
                    Open

                        packages : function () {
                          // banner message
                          this.banner('We will install needed packages');
                          // process install for each type
                          _.each([ 'node', 'angular'], function (type) {
                    Severity: Minor
                    Found in app/index copie.js - About 3 hrs 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

                    Function nodeBasePackage has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring.
                    Open

                        nodeBasePackage                   : function () {
                          // process node package ?
                          if (this.cfg.generate.node) {
                            // banner message
                            this.banner('Now tell us some informations about your NodeJs configuration.');
                    Severity: Minor
                    Found in app/index.js - About 2 hrs 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

                    Severity
                    Category
                    Status
                    Source
                    Language