Showing 76 of 179 total issues
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;
Function update
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
update(platforms) {
var _this = this,
projectData = this.project.data();
if (platforms.length === 0) {
Function fetchWrapper
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
static fetchWrapper(options) {
var pack = new Package('cloudbridge-core-cordova');
return Q()
.then(function() {
Function spawn
has a Cognitive Complexity of 11 (exceeds 5 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 = '';
- 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 copyTemplate
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
Utils.copyTemplate = function copyTemplate(origin, to, data, extensions) {
var files = fs.readdirSync(origin);
extensions = extensions || /\.(prw|js|ts|coffe|css|less|scss|html|md|json|xml|java)/;
- 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 getWindowsEnvironmentInfo
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Info.getWindowsEnvironmentInfo = function getWindowsEnvironmentInfo() {
// Windows version reference
// http://en.wikipedia.org/wiki/Ver_%28command%29
var version = os.release();
var windowsVersion = null;
Function fetchWrapper
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
static fetchWrapper(options) {
var pack = new Package('cloudbridge-core-ionic');
return Q()
.then(function() {
Function run
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
run(cloudbridge, argv) {
var _this = this,
platforms = _this.getPlatforms(argv);
if (platforms.length === 0) {
Function fetchWrapper
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
static fetchWrapper(options) {
var pack = new Package('cloudbridge-core-advpl');
return Q()
.then(function() {
Function printInfo
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Info.printInfo = function printInfo(info) {
logging.logger.info('\nYour system information:\n'.bold);
if (info.gulp) {
logging.logger.info('Gulp version:', info.gulp);
Function run
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
run(cloudbridge, argv) {
var _this = this,
platforms = _this.getPlatforms(argv);
if (platforms.length === 0) {
Function fixProjectV1
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
fixProjectV1() {
var project = this.project.data(),
components = project.components || {},
platform = project.platform || {};
Function run
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
run(cloudbridge, argv) {
var project = this.project.data(),
packagePath = path.join(this.projectDir, 'build', project.name + '-debug.apk'),
opts = {
replace: true
Function run
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
run(cloudbridge, argv) {
var _this = this,
platforms = _this.getPlatforms(argv);
if (platforms.length === 0) {
Function fetch
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
fetch() {
var _this = this,
homeDir = process.env.HOME || process.env.USERPROFILE || process.env.HOMEPATH,
packageDir = path.join(homeDir, '.cloudbridge', 'packages', this.group, this.name),
url = 'https://github.com/' + this.group + '/' + this.name + '/archive/';
Function save
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
save(packages, bowerResult) {
var silent = this.options.silent,
components = this.project.get('components') || {},
bowerComponents = components.bower || {},
originalData = this.objectify(packages),
Function save
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
save(packages, bowerResult) {
var components = this.project.get('components') || {},
bowerComponents = components.bower || {},
message = '';
- 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 getBooleanOptionsForTask
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
Cli.getBooleanOptionsForTask = function getBooleanOptionsForTask(task) {
var availableTaskOptions = task.options;
var booleanOptions = [];
if (availableTaskOptions) {
- 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 fixProjectV1
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
fixProjectV1() {
var project = this.project.data(),
components = project.components || {},
platform = project.platform || {};
- 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"