yoctore/yoctopus-generator

View on GitHub

Showing 44 of 179 total issues

Function generateTemplates has 60 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    generateTemplates   : function () {
      // create async process
      var done = this.async();

      // par sella available modules
Severity: Major
Found in app/index.js - About 2 hrs to fix

    Function build has 54 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        build : function (activeMock) {
          // mock is active ?
          if (activeMock) {
            $http.get('assets/mocks/mocks.json').then(function successCallback (success) {
              // check if the success.data has expectRoutes
    Severity: Major
    Found in app/templates/applications/angular/_services.js - About 2 hrs to fix

      Function process has 51 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          process : function (key, properties, config) {
            // normalize properties
            properties    = _.isObject(properties) ? properties : {};
      
            // normalize config
      Severity: Major
      Found in app/templates/applications/angular/_services.js - About 2 hrs to fix

        Function generateFiles has 48 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            generateFiles       : function () {
              // create async process
              var done = this.async();
        
              // types list
        Severity: Minor
        Found in app/index.js - About 1 hr to fix

          Function generateFiles has 48 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              generateFiles       : function () {
                // create async process
                var done = this.async();
          
                // types list
          Severity: Minor
          Found in app/index copie.js - About 1 hr to fix

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

                generateDirectory   : function () {
                  // create async process
                  var done = this.async();
            
                  // to execute
            Severity: Minor
            Found in app/index copie.js - About 1 hr to fix

              Function base has 43 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              exports.base = function (req, res) {
                // default config object
                var config = {};
              
                // normalize it
              Severity: Minor
              Found in app/templates/applications/node/app/controllers/_config.js - About 1 hr to fix

                Function generateExtraDependencies has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    generateExtraDependencies   : function () {
                      // create async process
                      var done = this.async();
                
                      // to execute
                Severity: Minor
                Found in app/index.js - About 1 hr to fix

                  Function generateDirectory has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      generateDirectory   : function () {
                        // create async process
                        var done = this.async();
                  
                        // to execute
                  Severity: Minor
                  Found in app/index.js - About 1 hr to fix

                    Function successCallback has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                            $http.get('assets/mocks/mocks.json').then(function successCallback (success) {
                              // check if the success.data has expectRoutes
                              if (_.has(success.data, 'expectRoutes')) {
                                // Parse the success.data.expectRoutes to build expect $httpBackend routes
                                _.forEach(success.data.expectRoutes, function (obj) {
                    Severity: Minor
                    Found in app/templates/applications/angular/_services.js - About 1 hr to fix

                      Function generateExtraDependencies has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          generateExtraDependencies   : function () {
                            // create async process
                            var done = this.async();
                      
                            // to execute
                      Severity: Minor
                      Found in app/index copie.js - About 1 hr to fix

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

                        module.exports = function (grunt) {
                          // init config
                          grunt.initConfig({
                            // default package
                            pkg       : grunt.file.readJSON('package.json'),
                        Severity: Minor
                        Found in Gruntfile.js - About 1 hr to fix

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

                              function ($http, appConstants, $rootScope, $q, logService) {
                                // Default statement
                                return {
                                  /**
                                   * Map configure method to change data from another place withour provider scope
                          Severity: Minor
                          Found in app/templates/applications/angular/_provider.js - About 1 hr to fix

                            Function packages has 32 lines of code (exceeds 25 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 1 hr to fix

                              Function packages has 32 lines of code (exceeds 25 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 1 hr to fix

                                Function robots has 31 lines of code (exceeds 25 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 1 hr to fix

                                  Function api has 31 lines of code (exceeds 25 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 1 hr to fix

                                    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.js - About 1 hr to fix

                                      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

                                        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

                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language