Showing 76 of 179 total issues
Function attachErrorHandling
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
Cli.attachErrorHandling = function attachErrorHandling() {
this.utils.errorHandler = function errorHandler(msg, taskHelp) {
try {
cli.logging.logger.debug('cli.utils.errorHandler msg', msg, typeof msg);
- 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 list
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
list() {
let homeDir = process.env.HOME || process.env.USERPROFILE || process.env.HOMEPATH,
packageDir = path.join(homeDir, '.cloudbridge', 'packages'),
groups = [];
- 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
Avoid deeply nested control flow statements. Open
if (!javacPath) {
process.env.PATH += path.delimiter + path.join(firstJdkDir, 'bin');
}
Function printAvailableTasks
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
Cli.printAvailableTasks = function printAvailableTasks(argv) {
Cli.printCloudBridge();
process.stderr.write('\nUsage: cloudbridge task args\n\n=======================\n\n');
if (process.argv.length > 2) {
- 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 printAvailableTasks
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
static printAvailableTasks(argv) {
this.printBanner();
process.stderr.write('\nUsage: cloudbridge task args\n\n=======================\n\n');
- 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 getEngine
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
Cli.getEngine = function getEngine(argv) {
var engine = 'default',
projectFile = path.join(this.cwd, 'cloudbridge.json');
if (fs.existsSync(projectFile)) {
- 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 printInfo
has a Cognitive Complexity of 7 (exceeds 5 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);
- 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 modifier
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
static modifier(range) {
if (typeof range === 'string') {
var modifier = range.trim();
if (modifier.length > 0) {
- 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 constructor
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
constructor(name, group, version) {
if (typeof name === 'object') {
var options = name;
this.name = options.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
Avoid too many return
statements within this function. Open
return this.utils.fail(ex);
Function run
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
run(cloudbridge, argv) {
try {
var isAddCmd = argv._.indexOf('add') !== -1;
var isRmCmd = argv._.indexOf('rm') !== -1 || argv._.indexOf('remove') !== -1;
var isUpdateCmd = argv._.indexOf('up') !== -1 || argv._.indexOf('update') !== -1;
- 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 6 (exceeds 5 allowed). Consider refactoring. Open
run(cloudbridge, argv) {
try {
var isAddCmd = argv._.indexOf('add') !== -1;
var isRmCmd = argv._.indexOf('rm') !== -1 || argv._.indexOf('remove') !== -1;
var isUpdateCmd = argv._.indexOf('up') !== -1 || argv._.indexOf('update') !== -1;
- 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 6 (exceeds 5 allowed). Consider refactoring. Open
run(cloudbridge, argv) {
if (argv.list || argv.l) {
var listTask = new StartListTask(this.options);
return listTask.run(cloudbridge);
- 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 createChoices
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
createChoices(packageType, longest) {
var choices = [],
packages = this.packages[packageType];
if (!Array.isArray(packages)) {
- 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 6 (exceeds 5 allowed). Consider refactoring. Open
run(cloudbridge, argv) {
try {
var isAddCmd = argv._.indexOf('add') !== -1;
var isRmCmd = argv._.indexOf('rm') !== -1 || argv._.indexOf('remove') !== -1;
var isUpdateCmd = argv._.indexOf('up') !== -1 || argv._.indexOf('update') !== -1;
- 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 6 (exceeds 5 allowed). Consider refactoring. Open
run(cloudbridge, argv) {
let cleanFiles = [];
if (argv.clean || argv.c) {
cleanFiles = Object.keys(fileUtils.loadModifiedTime(this.projectDir, ADVPL_SRC_RELATIVE));
- 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"