RackHD/on-tasks

View on GitHub

Showing 500 of 1,093 total issues

Identical blocks of code found in 2 locations. Consider refactoring.
Open

                                    if (count) {
                                        return waterline.catalogs.update(query, dataToSave);
                                    } else {
                                        return waterline.catalogs.create({
                                            node: self.nodeId,
Severity: Minor
Found in lib/jobs/racadm-catalog.js and 1 other location - About 35 mins to fix
lib/jobs/racadm-catalog.js on lines 84..107

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 47.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Identical blocks of code found in 3 locations. Consider refactoring.
Open

            self.wsman = new WsmanTool(self.dellConfigs.gateway, {
                verifySSL: self.options.verifySSL || false,
                recvTimeoutMs: 300000
            });
Severity: Minor
Found in lib/jobs/dell-wsman-bios.js and 2 other locations - About 35 mins to fix
lib/jobs/dell-wsman-get-trap-config.js on lines 76..79
lib/jobs/dell-wsman-inventory.js on lines 73..76

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 47.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

    UcsJob.prototype.removeConcurrentRequest = function(node, type) {
        var self = this;
        self.concurrent[node][type] -= 1;
    };
Severity: Minor
Found in lib/jobs/ucs-job.js and 1 other location - About 35 mins to fix
lib/jobs/ucs-job.js on lines 182..185

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 47.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Identical blocks of code found in 3 locations. Consider refactoring.
Open

            self.wsman = new WsmanTool(self.dellConfigs.gateway, {
                verifySSL: self.options.verifySSL || false,
                recvTimeoutMs: 300000
            });
Severity: Minor
Found in lib/jobs/dell-wsman-get-trap-config.js and 2 other locations - About 35 mins to fix
lib/jobs/dell-wsman-bios.js on lines 78..81
lib/jobs/dell-wsman-inventory.js on lines 73..76

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 47.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Identical blocks of code found in 3 locations. Consider refactoring.
Open

        return racadmTool.runCommand(self.ipAddress, self.username, self.password, command)
        .then(function(){
            logger.info('scheduling the job for controller: ' + controller);
            command = 'jobqueue create ' + controller;
            return racadmTool.runCommand(self.ipAddress, self.username, self.password, command);
Severity: Minor
Found in lib/jobs/add-volume.js and 2 other locations - About 35 mins to fix
lib/jobs/add-hotspare.js on lines 82..102
lib/jobs/delete-volume.js on lines 78..97

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 47.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

                assert.ok(_.has(obj, accumulator),
                    'expected property [' + accumulator + '] to be supplied for task ' +
                    taskName + ' in graph ' + self.injectableName);
Severity: Minor
Found in lib/task-graph.js and 1 other location - About 35 mins to fix
lib/task-graph.js on lines 521..523

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 47.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 3 locations. Consider refactoring.
Open

module.exports = {
    friendlyName: 'EMC Compose System Job',
    injectableName: 'Task.Base.Emc.Compose.System',
    runJob: 'Job.Emc.Compose.System',
    requiredOptions: [ 
Severity: Minor
Found in lib/task-data/base-tasks/emc-compose-system.js and 2 other locations - About 35 mins to fix
lib/task-data/base-tasks/run-graph.js on lines 5..15
lib/task-data/base-tasks/sftp.js on lines 6..16

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 47.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

    UcsJob.prototype.addConcurrentRequest = function(node, type) {
        var self = this;
        self.concurrent[node][type] += 1;
    };
Severity: Minor
Found in lib/jobs/ucs-job.js and 1 other location - About 35 mins to fix
lib/jobs/ucs-job.js on lines 191..194

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 47.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

                assert.ok(_.has(accumulator, key),
                    'expected property [' + key + '] to be supplied for task ' +
                    taskName + ' in graph ' + self.injectableName);
Severity: Minor
Found in lib/task-graph.js and 1 other location - About 35 mins to fix
lib/task-graph.js on lines 515..517

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 47.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Identical blocks of code found in 3 locations. Consider refactoring.
Open

        return racadmTool.runCommand(self.ipAddress, self.username, self.password, command)
        .then(function(){
            var controller = self.volumeId.split(":")[1];
            logger.info('scheduling the job for controller: ' + controller);
            command = 'jobqueue create ' + controller;
Severity: Minor
Found in lib/jobs/delete-volume.js and 2 other locations - About 35 mins to fix
lib/jobs/add-hotspare.js on lines 82..102
lib/jobs/add-volume.js on lines 91..109

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 47.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 3 locations. Consider refactoring.
Open

module.exports = {
    friendlyName: 'Sftp',
    injectableName: 'Task.Base.Sftp',
    runJob: 'Job.Sftp',
    requiredOptions: [
Severity: Minor
Found in lib/task-data/base-tasks/sftp.js and 2 other locations - About 35 mins to fix
lib/task-data/base-tasks/emc-compose-system.js on lines 5..15
lib/task-data/base-tasks/run-graph.js on lines 5..15

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 47.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

        if (fileInfo.style === 'remote') {
            command = "update -f " + fileInfo.name + " -u " +
                cifsUser + " -p " + cifsPassword + " -l " + fileInfo.path;
        } else { // 'local'
            command = "update -f " + fileInfo.path + "/" + fileInfo.name;
Severity: Minor
Found in lib/utils/job-utils/racadm-tool.js and 1 other location - About 35 mins to fix
lib/utils/job-utils/racadm-tool.js on lines 207..212

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 47.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Identical blocks of code found in 3 locations. Consider refactoring.
Open

        return racadmTool.runCommand(self.ipAddress, self.username, self.password, command)
        .then(function(){
            var driveFQDD = self.driveId.split(":");
            var controller = driveFQDD[driveFQDD.length - 1];
            logger.info('scheduling the job for controller: ' + controller);
Severity: Minor
Found in lib/jobs/add-hotspare.js and 2 other locations - About 35 mins to fix
lib/jobs/add-volume.js on lines 91..109
lib/jobs/delete-volume.js on lines 78..97

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 47.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

        if (fileInfo.style === 'remote') {
            command = "set -f " + fileInfo.name + " -t xml -u " +
                cifsUser + " -p " + cifsPassword + " -l " + fileInfo.path;
        } else { // 'local'
            command = "set -f " + fileInfo.path + "/" + fileInfo.name + " -t xml";
Severity: Minor
Found in lib/utils/job-utils/racadm-tool.js and 1 other location - About 35 mins to fix
lib/utils/job-utils/racadm-tool.js on lines 259..264

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 47.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Identical blocks of code found in 2 locations. Consider refactoring.
Open

                        if (self.updateExistingCatalog === true) {
                            var query = {
                                node: self.nodeId,
                                source: result.source
                            };
Severity: Minor
Found in lib/jobs/racadm-catalog.js and 1 other location - About 35 mins to fix
lib/jobs/racadm-catalog.js on lines 91..99

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 47.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 15 locations. Consider refactoring.
Open

module.exports = {
    friendlyName: 'Ansible Playbook',
    injectableName: 'Task.Base.Ansible',
    runJob: 'Job.Ansible.Playbook',
    requiredOptions: [
Severity: Major
Found in lib/task-data/base-tasks/ansible.js and 14 other locations - About 35 mins to fix
lib/task-data/base-tasks/create-default-pollers.js on lines 5..14
lib/task-data/base-tasks/create-default-redfish-pollers.js on lines 5..14
lib/task-data/base-tasks/dell-wsman-create-repo.js on lines 5..14
lib/task-data/base-tasks/dell-wsman-download-base.js on lines 5..14
lib/task-data/base-tasks/dell-wsman-firmware-collect.js on lines 5..14
lib/task-data/base-tasks/dell-wsman-os-create-base.js on lines 4..13
lib/task-data/base-tasks/dell-wsman-os-deploy-base.js on lines 4..13
lib/task-data/base-tasks/dell-wsman-powerthermal.js on lines 5..14
lib/task-data/base-tasks/generate-tag.js on lines 5..14
lib/task-data/base-tasks/racadm-catalog-base.js on lines 5..14
lib/task-data/base-tasks/racadm-control-base.js on lines 5..14
lib/task-data/base-tasks/run-sku-graph.js on lines 5..14
lib/task-data/base-tasks/shell-reboot.js on lines 5..14
lib/task-data/base-tasks/winpe-bootstrapper.js on lines 5..14

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 46.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 15 locations. Consider refactoring.
Open

module.exports = {
    friendlyName: 'Generate Tag',
    injectableName: 'Task.Base.Catalog.GenerateTag',
    runJob: 'Job.Catalog.GenerateTag',
    requiredOptions: [
Severity: Major
Found in lib/task-data/base-tasks/generate-tag.js and 14 other locations - About 35 mins to fix
lib/task-data/base-tasks/ansible.js on lines 5..14
lib/task-data/base-tasks/create-default-pollers.js on lines 5..14
lib/task-data/base-tasks/create-default-redfish-pollers.js on lines 5..14
lib/task-data/base-tasks/dell-wsman-create-repo.js on lines 5..14
lib/task-data/base-tasks/dell-wsman-download-base.js on lines 5..14
lib/task-data/base-tasks/dell-wsman-firmware-collect.js on lines 5..14
lib/task-data/base-tasks/dell-wsman-os-create-base.js on lines 4..13
lib/task-data/base-tasks/dell-wsman-os-deploy-base.js on lines 4..13
lib/task-data/base-tasks/dell-wsman-powerthermal.js on lines 5..14
lib/task-data/base-tasks/racadm-catalog-base.js on lines 5..14
lib/task-data/base-tasks/racadm-control-base.js on lines 5..14
lib/task-data/base-tasks/run-sku-graph.js on lines 5..14
lib/task-data/base-tasks/shell-reboot.js on lines 5..14
lib/task-data/base-tasks/winpe-bootstrapper.js on lines 5..14

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 46.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 3 locations. Consider refactoring.
Open

                if (data.stdout.length === 0 )  {
                    return Promise.resolve({ source: userListSource, data: '', store: false });
                }
Severity: Minor
Found in lib/utils/job-utils/command-parser.js and 2 other locations - About 35 mins to fix
lib/utils/job-utils/command-parser.js on lines 163..165
lib/utils/job-utils/command-parser.js on lines 218..220

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 46.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 3 locations. Consider refactoring.
Open

                if (data.stdout.length === 0 )  {
                    return Promise.resolve({ source: userSummarySource, data: '', store: false });
                }
Severity: Minor
Found in lib/utils/job-utils/command-parser.js and 2 other locations - About 35 mins to fix
lib/utils/job-utils/command-parser.js on lines 105..107
lib/utils/job-utils/command-parser.js on lines 218..220

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 46.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 15 locations. Consider refactoring.
Open

module.exports = {
    friendlyName: 'Run Sku Graph Base',
    injectableName: 'Task.Base.Graph.RunSku',
    runJob: 'Job.Graph.RunSku',
    requiredOptions: [
Severity: Major
Found in lib/task-data/base-tasks/run-sku-graph.js and 14 other locations - About 35 mins to fix
lib/task-data/base-tasks/ansible.js on lines 5..14
lib/task-data/base-tasks/create-default-pollers.js on lines 5..14
lib/task-data/base-tasks/create-default-redfish-pollers.js on lines 5..14
lib/task-data/base-tasks/dell-wsman-create-repo.js on lines 5..14
lib/task-data/base-tasks/dell-wsman-download-base.js on lines 5..14
lib/task-data/base-tasks/dell-wsman-firmware-collect.js on lines 5..14
lib/task-data/base-tasks/dell-wsman-os-create-base.js on lines 4..13
lib/task-data/base-tasks/dell-wsman-os-deploy-base.js on lines 4..13
lib/task-data/base-tasks/dell-wsman-powerthermal.js on lines 5..14
lib/task-data/base-tasks/generate-tag.js on lines 5..14
lib/task-data/base-tasks/racadm-catalog-base.js on lines 5..14
lib/task-data/base-tasks/racadm-control-base.js on lines 5..14
lib/task-data/base-tasks/shell-reboot.js on lines 5..14
lib/task-data/base-tasks/winpe-bootstrapper.js on lines 5..14

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 46.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Severity
Category
Status
Source
Language