Showing 9 of 20 total issues
File index.js
has 413 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
'use strict';
var yeoman = require('yeoman-generator'),
fs = require('fs'),
util = require('util'),
path = require('path'),
Function install
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
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
Function config
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var config = function() {
// Source Path
var src = {
root : 'app',
Function askAngularModules
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
smacssGenerator.prototype.askAngularModules = function askAngularModules() {
if(this.appType === 'typeAngularApp') {
var done = this.async();
var prompts = [{
name: 'angularModules',
Function askAppType
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
smacssGenerator.prototype.askAppType = function askAppType() {
var done = this.async();
var prompts = [{
name: 'appName',
Function Generator
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var Generator = module.exports = function Generator() {
yeoman.generators.NamedBase.apply(this, arguments);
var bowerJson = {};
Function askAppLibraries
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
smacssGenerator.prototype.askAppLibraries = function askAppLibraries() {
if(this.appType === 'typeFullPackWebApp' ||
this.appType === 'typeAdminWebApp') {
var done = this.async();
var prompts = [{
Function Generator
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
Open
var Generator = module.exports = function Generator() {
yeoman.generators.NamedBase.apply(this, arguments);
var bowerJson = {};
- Read upRead up
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
Open
smacssGenerator.prototype.scaffoldFolders = function scaffoldFolders() {
this.log(
chalk.yellow('\n┌──────────────────────────────────────────────────────────────┐ \n' +
'| Creating the project structure | \n' +
'└──────────────────────────────────────────────────────────────┘ ')
- Read upRead up
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"