Showing 11 of 34 total issues
Function exports
has 508 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function (grunt) {
require('load-grunt-tasks')(grunt);
require('time-grunt')(grunt);
var includes = require('./resources.json');
File Gruntfile.js
has 512 lines of code (exceeds 250 allowed). Consider refactoring. Open
// Generated on <%= (new Date).toISOString().split('T')[0] %> using <%= pkg.name %> <%= pkg.version %>
'use strict';
var path = require('path');
module.exports = function (grunt) {
Function askForModules
has 80 lines of code (exceeds 25 allowed). Consider refactoring. Open
Generator.prototype.askForModules = function askForModules() {
var cb = this.async();
var prompts = [
{
Function Generator
has 52 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 exports
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function (grunt) {
require('load-grunt-tasks')(grunt);
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
Function exports
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function (config) {
var preprocessors = {},
mapAppPath = function (path) {
return appPath + '/' + path;
Function Generator
has 28 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)));
Function Generator
has a Cognitive Complexity of 9 (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 generateSourceAndTest
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Generator.prototype.generateSourceAndTest = function (appTemplate, testTemplate, targetDirectory, testTargetDirectory, targetFilename) {
Function deepExtend
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
angular.deepExtend = function (destination, source) {
for (var property in source) {
if (source[property] && source[property].constructor && source[property].constructor === Object) {
destination[property] = destination[property] || {};
angular.deepExtend(destination[property], source[property]);
- 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 exports
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
module.exports = function (grunt) {
require('load-grunt-tasks')(grunt);
require('time-grunt')(grunt);
var includes = require('./resources.json');
- 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"