Showing 76 of 179 total issues
Function setUpConsoleLoggingHelpers
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
Logging.setUpConsoleLoggingHelpers = function setUpConsoleLoggingHelpers() {
colors.setTheme({
silly: 'rainbow',
input: 'grey',
small: 'grey',
- 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 run
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
Cli.run = function run(processArgv, processCwd) {
this.cwd = processCwd || process.cwd();
try {
//First we parse out the args to use them.
- 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 checkRuntime
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
Info.checkRuntime = function checkRuntime() {
var info = this.gatherInfo(),
iosDeployInstalled = false,
iosSimInstalled = false,
nodeUpgrade = 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 run
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
run(cloudbridge, argv) {
if (argv.list || argv.l) {
var listTask = new StartListTask(this.options);
return listTask.run(cloudbridge);
Function showPrompt
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
showPrompt() {
var longest = this.getLongests(),
choices = [],
bowerChoices,
platformChoices,
Function spawn
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function spawn(command, args, options) {
var deferred = Q.defer();
var child = child_process.spawn(command, args, options);
var capturedOut = '';
var capturedErr = '';
Function run
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
run(cloudbridge, argv) {
var _this = this,
platforms = _this.getPlatforms(argv);
if (platforms.length === 0) {
Function run
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
run(cloudbridge, argv) {
var _this = this,
platforms = _this.getPlatforms(argv);
if (platforms.length === 0) {
Function run
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
run(cloudbridge, argv) {
var appserver = new AppServer({
target: paths.get("APPSERVER", this.projectDir)
}),
smartclient = new SmartClient({
Function run
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
run(cloudbridge, argv) {
var appserver = new AppServer({
target: paths.get("APPSERVER", this.projectDir)
}),
smartclient = new SmartClient({
Function startApp
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
static startApp(options) {
if (typeof options !== 'object' || typeof options === 'undefined') {
throw new Error('You cannot start an app without options');
}
Function run
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
run(cloudbridge, argv) {
var _this = this,
platforms = _this.getPlatforms(argv);
if (platforms.length === 0) {
Function getTaskWithName
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
TASKS.getTaskWithName = function getTaskWithName(name) {
for (var i = 0; i < TASKS.length; i++) {
var t = TASKS[i];
if (t.name === 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 run
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
run(cloudbridge, argv) {
if (argv._.length < 2) {
return utils.fail('Invalid command', 'start');
}
Function promptForOverwrite
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
static promptForOverwrite(targetPath, _argv) {
var deferred = Q.defer(),
choiceOverwrite = {
name: 'Overwrite',
value: 0,
Function promptForOverwrite
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
static promptForOverwrite(targetPath, _argv) {
var deferred = Q.defer(),
choiceOverwrite = {
name: 'Overwrite',
value: 0,
Function promptForOverwrite
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
static promptForOverwrite(targetPath, _argv) {
var deferred = Q.defer(),
choiceOverwrite = {
name: 'Overwrite',
value: 0,
Function run
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
run(cloudbridge, argv) {
if (argv._.length < 2) {
return utils.fail('Invalid command', 'start');
}
Function run
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
run(cloudbridge, argv) {
let forceClean = this.needClean(argv),
task,
promise,
noADVPL = false;
Function run
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
run(cloudbridge, argv) {
let forceClean = this.needClean(argv),
task,
promise,
noADVPL = false;