FuelFrontend/generator-smacss

View on GitHub

Showing 9 of 20 total issues

File index.js has 413 lines of code (exceeds 250 allowed). Consider refactoring.
Open

'use strict';
var yeoman = require('yeoman-generator'),
    fs = require('fs'),
    util = require('util'),
    path = require('path'),
Severity: Minor
Found in app/index.js - About 5 hrs to fix

    Function install has 62 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    smacssGenerator.prototype.install = function install() {
        // Installation context object
        var installContext = {};
        installContext.appPath = process.cwd() + "/"+ this.appName;
        process.chdir(installContext.appPath); // activating app directory for installation
    Severity: Major
    Found in app/index.js - About 2 hrs to fix

      Function config has 58 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      var config =  function() {
      
          // Source Path
          var src = {
              root   : 'app',
      Severity: Major
      Found in app/templates/tasks/_config.js - About 2 hrs to fix

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

        smacssGenerator.prototype.askAngularModules = function askAngularModules() {
            if(this.appType === 'typeAngularApp') {
                var done = this.async();
                var prompts = [{
                    name: 'angularModules',
        Severity: Major
        Found in app/index.js - About 2 hrs to fix

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

          smacssGenerator.prototype.askAppType = function askAppType() {
              var done = this.async();
          
              var prompts = [{
                  name: 'appName',
          Severity: Minor
          Found in app/index.js - About 1 hr to fix

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

            var Generator = module.exports = function Generator() {
              yeoman.generators.NamedBase.apply(this, arguments);
            
              var bowerJson = {};
            
            
            Severity: Minor
            Found in script-base.js - About 1 hr to fix

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

              smacssGenerator.prototype.askAppLibraries = function askAppLibraries() {
                  if(this.appType === 'typeFullPackWebApp' ||
                     this.appType === 'typeAdminWebApp') {
                      var done = this.async();
                      var prompts = [{
              Severity: Minor
              Found in app/index.js - About 1 hr to fix

                Function Generator has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                Open

                var Generator = module.exports = function Generator() {
                  yeoman.generators.NamedBase.apply(this, arguments);
                
                  var bowerJson = {};
                
                
                Severity: Minor
                Found in script-base.js - About 1 hr 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 scaffoldFolders has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                Open

                smacssGenerator.prototype.scaffoldFolders = function scaffoldFolders() {
                    this.log(
                      chalk.yellow('\n┌──────────────────────────────────────────────────────────────┐ \n' +
                                     '| Creating the project structure                               | \n' +
                                     '└──────────────────────────────────────────────────────────────┘ ')
                Severity: Minor
                Found in app/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

                Severity
                Category
                Status
                Source
                Language