Showing 60 of 84 total issues
Function walkChildren
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
function walkChildren( list, seedFound, callback ) {
var newList = [];
if ( !!seedFound ) {
newList.push( seedFound );
Function installWithNpm
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
exports.installWithNpm = function(location, packages) {
return new Promise(function(resolve, reject) {
async.each(
packages,
function(pkg, next) {
Function exports
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
module.exports = function(Table, env, lib, repl, local) {
function Commands() {
this.help = 'Lists all of the REPL commands';
this.aliases = ['h', 'help'];
this.table = new Table({
- 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 findAvailableCommands
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
exports.findAvailableCommands = function ( ) {
return new Promise( function( resolve, reject ) {
get()
.then( function( locations ) {
var useNPM = false
- 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 10 (exceeds 5 allowed). Consider refactoring. Open
module.exports = function (thePath, program, cmd, args) {
if (arguments.length < 4) {
args = cmd;
cmd = program;
program = require(path.join(__dirname, 'program'));
- 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 install
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
exports.install = function(modulePath, options, fn) {
var additionalOptions = [ ]
, params = { cwd: modulePath };
if (typeof options === '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"
Further reading
Function exports
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
module.exports = function(Table, env, lib, repl, local, util, _) {
Function exports
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
module.exports = function(Table, env, lib, repl, local, util, _) {
Function get
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
var get = exports.get = function(pkg, url, dir) {
if (arguments.length < 3) {
var name = pkg.name.split('@')[ 0 ];
dir = url;
url = 'https://github.com/' + pkg.owner + '/' + name + '/archive/master.tar.gz';
- 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 display
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
module.exports.display = function(repo) {
var title = [ repo.name ];
if (repo.version !== undefined) {
title.push(colors.darkGray('@ ' + repo.version));
}
- 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 8 (exceeds 5 allowed). Consider refactoring. Open
module.exports = function(env, lib, repl, local) {
function ReplHistory() {
this.help = 'Shows command history';
var maxSize = 10240
- 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 generate
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
exports.generate = function(project, tmpls, names, fn) {
if (arguments.length < 4) {
fn = names;
names = tmpls;
tmpls = project;
- 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
Consider simplifying this complex logical expression. Open
if ( !!stats.isDirectory() ) {
var packageJson = fs.readdirSync( thePath ).indexOf( 'package.json' ) !== -1 ? require( path.resolve( [ thePath, 'package.json' ].join( path.sep ) ) ) : false
, isCleverStack = !!packageJson && !!packageJson.author && !!packageJson.author.name && packageJson.author.name.toLowerCase() === 'cleverstack'
, isNodeSeed = isCleverStack && packageJson.name === 'node-seed'
, isAngularSeed = isCleverStack && packageJson.name === 'angular-seed';
Consider simplifying this complex logical expression. Open
if ( !!stats.isDirectory() ) {
var packageJson = fs.readdirSync( thePath ).indexOf( 'package.json' ) !== -1 ? require( path.resolve( [ thePath, 'package.json' ].join( path.sep ) ) ) : false
, isCleverStack = !!packageJson && !!packageJson.author && !!packageJson.author.name && packageJson.author.name.toLowerCase() === 'cleverstack'
, isNodeSeed = isCleverStack && packageJson.name === 'node-seed'
, isAngularSeed = isCleverStack && packageJson.name === 'angular-seed';
Function template
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
exports.template = function(dirs, names, tmpls, project, fn) {
Function exports
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
module.exports = function(Table, env, lib, repl, local) {
Function exports
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
module.exports = function(Table, env, lib, repl, local) {
Function installWithNpm
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
exports.installWithNpm = function(location, packages) {
return new Promise(function(resolve, reject) {
async.each(
packages,
function(pkg, next) {
- 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 installFrontendModules
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
var installFrontendModules = exports.installFrontendModules = function(location, packages) {
return new Promise(function(resolve, reject) {
async.eachSeries(
packages,
function(pkg, next) {
- 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(Table, env, lib, repl, local, util, _) {
var serviceFuncs = ['find', 'findAll', 'create', 'update', 'destroy'];
function Services() {
this.help = 'Lists all of the services within this project';
- 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"