Showing 76 of 179 total issues
Function printUsage
has a Cognitive Complexity of 36 (exceeds 5 allowed). Consider refactoring. Open
Open
static printUsage(d) {
var w = function(s) {
process.stdout.write(s);
};
- 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 check_android
has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring. Open
Open
Checker.check_android = function() {
return Q().then(function() {
var androidCmdPath = forgivingWhichSync('android');
var adbInPath = !!forgivingWhichSync('adb');
var hasAndroidHome = !!process.env.ANDROID_HOME && fs.existsSync(process.env.ANDROID_HOME);
- 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 fetchArchive
has 80 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Utils.fetchArchive = function fetchArchive(targetPath, archiveUrl, isGui) {
var q = Q.defer();
// The folder name the project will be downloaded and extracted to
var message = ['\nDownloading:'.bold, archiveUrl].join(' ');
Function printUsage
has 79 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
static printUsage(d) {
var w = function(s) {
process.stdout.write(s);
};
Function check_android
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Checker.check_android = function() {
return Q().then(function() {
var androidCmdPath = forgivingWhichSync('android');
var adbInPath = !!forgivingWhichSync('adb');
var hasAndroidHome = !!process.env.ANDROID_HOME && fs.existsSync(process.env.ANDROID_HOME);
Function run
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Cli.run = function run(processArgv, processCwd) {
this.cwd = processCwd || process.cwd();
try {
//First we parse out the args to use them.
File start.js
has 263 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
'use strict';
var fs = require('fs'),
path = require('path'),
shelljs = require('shelljs'),
Function check_java
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Checker.check_java = function() {
var javacPath = forgivingWhichSync('javac');
var hasJavaHome = !!process.env.JAVA_HOME;
return Q().then(function() {
File update.js
has 255 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
'use strict';
var AppTask = require('./app-task'),
Package = cb_require('utils/package'),
bower = cb_require('utils/bower'),
Function run
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
run(cloudbridge, argv) {
let cleanFiles = [];
if (argv.clean || argv.c) {
cleanFiles = Object.keys(fileUtils.loadModifiedTime(this.projectDir, ADVPL_SRC_RELATIVE));
File info.js
has 251 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
'use strict';
var path = require('path'),
shelljs = require('shelljs'),
os = require('os'),
Function startApp
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
static startApp(options) {
var name = options.appDirectory,
id = options.packageName,
backend = ionic.config.get('backend', '--global');
Function install
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
static install(target, packagePath, opts) {
console.log('Installing apk ' + packagePath + ' on target ' + target + '...\n');
var args = ['-s', target, 'install'];
Function update
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
update(platforms) {
var _this = this,
projectData = this.project.data();
if (platforms.length === 0) {
Function update
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
update(platforms) {
var _this = this,
projectData = this.project.data();
if (platforms.length === 0) {
Function setUpConsoleLoggingHelpers
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Logging.setUpConsoleLoggingHelpers = function setUpConsoleLoggingHelpers() {
colors.setTheme({
silly: 'rainbow',
input: 'grey',
small: 'grey',
Function run
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
run(cloudbridge, argv) {
let forceClean = this.needClean(argv),
task = new AdvplCompileTask(this.options),
promise = task.run(cloudbridge, argv);
Function latest
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
latest() {
var deferred = Q.defer(),
etag = this.getEtag(),
url = 'https://api.github.com/repos/' + this.group + '/' + this.name + '/tags',
_this = this,
Function checkRuntime
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Info.checkRuntime = function checkRuntime() {
var info = this.gatherInfo(),
iosDeployInstalled = false,
iosSimInstalled = false,
nodeUpgrade = false,
Function run
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
run(cloudbridge, argv) {
var project = this.project.data(),
packagePath = path.join(this.projectDir, 'src', 'ios', 'build', 'Release-iphoneos', project.name + '.app');
return this.build(argv)