Showing 11 of 28 total issues
Function Generator
has 97 lines of code (exceeds 25 allowed). Consider refactoring. Open
var Generator = module.exports = function Generator(args, options) {
yeoman.generators.Base.apply(this, arguments);
this.argument('appname', { type: String, required: false });
this.appname = this.appname || path.basename(process.cwd());
this.appname = this._.camelize(this._.slugify(this._.humanize(this.appname)));
File index.js
has 304 lines of code (exceeds 250 allowed). Consider refactoring. Open
'use strict';
var fs = require('fs');
var path = require('path');
var util = require('util');
var angularUtils = require('../util.js');
Function exports
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function (grunt) {
require('load-grunt-tasks')(grunt);
grunt.initConfig({
pkg: require('./package.json'),
Function askForModules
has 66 lines of code (exceeds 25 allowed). Consider refactoring. Open
Generator.prototype.askForModules = function askForModules() {
var cb = this.async();
var prompts = [{
type: 'checkbox',
Function Generator
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
var Generator = module.exports = function Generator() {
yeoman.generators.NamedBase.apply(this, arguments);
try {
this.appname = require(path.join(process.cwd(), 'bower.json')).name;
- 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 Generator
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
var Generator = module.exports = function Generator() {
yeoman.generators.NamedBase.apply(this, arguments);
try {
this.appname = require(path.join(process.cwd(), 'bower.json')).name;
Function Generator
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
var Generator = module.exports = function Generator(args, options) {
yeoman.generators.Base.apply(this, arguments);
this.argument('appname', { type: String, required: false });
this.appname = this.appname || path.basename(process.cwd());
this.appname = this._.camelize(this._.slugify(this._.humanize(this.appname)));
- 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 rewriteAppJs
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Generator.prototype.rewriteAppJs = function () {
var coffee = this.env.options.coffee;
if (!this.foundWhenForRoute) {
this.on('end', function () {
Function Generator
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
var Generator = module.exports = function Generator() {
yeoman.generators.NamedBase.apply(this, arguments);
this.sourceRoot(path.join(__dirname, '../templates/common'));
- 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 Generator
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
var Generator = module.exports = function Generator(args, options) {
ScriptBase.apply(this, arguments);
this.fileName = this.name;
if (typeof this.env.options.appPath === 'undefined') {
- 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 rewriteAppJs
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
Generator.prototype.rewriteAppJs = function () {
var coffee = this.env.options.coffee;
if (!this.foundWhenForRoute) {
this.on('end', function () {
- 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"