RackHD/on-tasks

View on GitHub

Showing 1,093 of 1,093 total issues

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

    BaseObmService.prototype.kill = function() {
        if (this.childProcess) {
            this.childProcess.killSafe();
        }
    };
Severity: Minor
Found in lib/services/base-obm-service.js and 1 other location - About 30 mins to fix
lib/utils/job-utils/ansible.js on lines 45..49

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 45.

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

Avoid too many return statements within this function.
Open

                    return 'unknown';
Severity: Major
Found in lib/utils/metrics/base-metric.js - About 30 mins to fix

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

    module.exports = {
        friendlyName: 'Dell Wsman Configure Redfish Alert',
        injectableName: 'Task.Base.Dell.Wsman.Configure.Redfish.Alert',
        runJob: 'Job.Dell.Wsman.Configure.Redfish.Alert',
        requiredOptions: [
    lib/task-data/base-tasks/add-hotspare.js on lines 3..13
    lib/task-data/base-tasks/add-volume.js on lines 3..13
    lib/task-data/base-tasks/clean-workitems.js on lines 5..12
    lib/task-data/base-tasks/copy-key.js on lines 6..13
    lib/task-data/base-tasks/delete-volume.js on lines 3..13
    lib/task-data/base-tasks/dell-wsman-RAID.js on lines 5..15
    lib/task-data/base-tasks/dell-wsman-add-hotspare-updatexml.js on lines 5..12
    lib/task-data/base-tasks/dell-wsman-add-volume-updateXml.js on lines 5..15
    lib/task-data/base-tasks/dell-wsman-delete-volume-updateXml.js on lines 5..15
    lib/task-data/base-tasks/dell-wsman-getXml.js on lines 5..15
    lib/task-data/base-tasks/dell-wsman-simple-update-firmware.js on lines 5..15
    lib/task-data/base-tasks/dell-wsman-update-lookups-base.js on lines 5..12
    lib/task-data/base-tasks/download-http-file-base.js on lines 5..12
    lib/task-data/base-tasks/generate-enclosure.js on lines 5..12
    lib/task-data/base-tasks/generate-sku.js on lines 5..12
    lib/task-data/base-tasks/ipmi-sdr-poller-alert.js on lines 5..12
    lib/task-data/base-tasks/ipmi-sel-poller-alert.js on lines 5..12
    lib/task-data/base-tasks/ipmi.js on lines 5..12
    lib/task-data/base-tasks/node-discovered-alert.js on lines 5..12
    lib/task-data/base-tasks/password-generation.js on lines 5..12
    lib/task-data/base-tasks/pdu-node-relations.js on lines 5..12
    lib/task-data/base-tasks/redfish-update-lookups.js on lines 5..12
    lib/task-data/base-tasks/redfish.js on lines 5..12
    lib/task-data/base-tasks/run-workitems.js on lines 5..12
    lib/task-data/base-tasks/snmp-node-update.js on lines 5..12
    lib/task-data/base-tasks/snmp-poller-alert.js on lines 5..12
    lib/task-data/base-tasks/snmp-update-lookups.js on lines 5..12
    lib/task-data/base-tasks/snmp.js on lines 5..12
    lib/task-data/base-tasks/switch-node-relations.js on lines 5..12
    lib/task-data/base-tasks/test-poller.js on lines 5..12
    lib/task-data/base-tasks/ucs.js on lines 5..12
    lib/task-data/base-tasks/validate-ssh.js on lines 6..13
    lib/task-data/base-tasks/wait-for-notification.js on lines 5..12
    lib/task-data/base-tasks/wsman.js on lines 5..12

    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 45.

    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

    Avoid too many return statements within this function.
    Open

                        return Promise.resolve({ data: parsed, source: bmcsource, store: store });
    Severity: Major
    Found in lib/utils/job-utils/command-parser.js - About 30 mins to fix

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

      module.exports = {
          friendlyName: 'Redfish Requester',
          injectableName: 'Task.Base.Redfish',
          runJob: 'Job.Redfish',
          requiredOptions: [],
      Severity: Major
      Found in lib/task-data/base-tasks/redfish.js and 34 other locations - About 30 mins to fix
      lib/task-data/base-tasks/add-hotspare.js on lines 3..13
      lib/task-data/base-tasks/add-volume.js on lines 3..13
      lib/task-data/base-tasks/clean-workitems.js on lines 5..12
      lib/task-data/base-tasks/copy-key.js on lines 6..13
      lib/task-data/base-tasks/delete-volume.js on lines 3..13
      lib/task-data/base-tasks/dell-wsman-RAID.js on lines 5..15
      lib/task-data/base-tasks/dell-wsman-add-hotspare-updatexml.js on lines 5..12
      lib/task-data/base-tasks/dell-wsman-add-volume-updateXml.js on lines 5..15
      lib/task-data/base-tasks/dell-wsman-configure-redfish-alert.js on lines 5..13
      lib/task-data/base-tasks/dell-wsman-delete-volume-updateXml.js on lines 5..15
      lib/task-data/base-tasks/dell-wsman-getXml.js on lines 5..15
      lib/task-data/base-tasks/dell-wsman-simple-update-firmware.js on lines 5..15
      lib/task-data/base-tasks/dell-wsman-update-lookups-base.js on lines 5..12
      lib/task-data/base-tasks/download-http-file-base.js on lines 5..12
      lib/task-data/base-tasks/generate-enclosure.js on lines 5..12
      lib/task-data/base-tasks/generate-sku.js on lines 5..12
      lib/task-data/base-tasks/ipmi-sdr-poller-alert.js on lines 5..12
      lib/task-data/base-tasks/ipmi-sel-poller-alert.js on lines 5..12
      lib/task-data/base-tasks/ipmi.js on lines 5..12
      lib/task-data/base-tasks/node-discovered-alert.js on lines 5..12
      lib/task-data/base-tasks/password-generation.js on lines 5..12
      lib/task-data/base-tasks/pdu-node-relations.js on lines 5..12
      lib/task-data/base-tasks/redfish-update-lookups.js on lines 5..12
      lib/task-data/base-tasks/run-workitems.js on lines 5..12
      lib/task-data/base-tasks/snmp-node-update.js on lines 5..12
      lib/task-data/base-tasks/snmp-poller-alert.js on lines 5..12
      lib/task-data/base-tasks/snmp-update-lookups.js on lines 5..12
      lib/task-data/base-tasks/snmp.js on lines 5..12
      lib/task-data/base-tasks/switch-node-relations.js on lines 5..12
      lib/task-data/base-tasks/test-poller.js on lines 5..12
      lib/task-data/base-tasks/ucs.js on lines 5..12
      lib/task-data/base-tasks/validate-ssh.js on lines 6..13
      lib/task-data/base-tasks/wait-for-notification.js on lines 5..12
      lib/task-data/base-tasks/wsman.js on lines 5..12

      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 45.

      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 35 locations. Consider refactoring.
      Open

      module.exports = {
          friendlyName: 'Ipmi Sdr Poller Alerts',
          injectableName: 'Task.Base.Poller.Alert.Ipmi.Sdr',
          runJob: 'Job.Poller.Alert.Ipmi.Sdr',
          requiredOptions: [],
      Severity: Major
      Found in lib/task-data/base-tasks/ipmi-sdr-poller-alert.js and 34 other locations - About 30 mins to fix
      lib/task-data/base-tasks/add-hotspare.js on lines 3..13
      lib/task-data/base-tasks/add-volume.js on lines 3..13
      lib/task-data/base-tasks/clean-workitems.js on lines 5..12
      lib/task-data/base-tasks/copy-key.js on lines 6..13
      lib/task-data/base-tasks/delete-volume.js on lines 3..13
      lib/task-data/base-tasks/dell-wsman-RAID.js on lines 5..15
      lib/task-data/base-tasks/dell-wsman-add-hotspare-updatexml.js on lines 5..12
      lib/task-data/base-tasks/dell-wsman-add-volume-updateXml.js on lines 5..15
      lib/task-data/base-tasks/dell-wsman-configure-redfish-alert.js on lines 5..13
      lib/task-data/base-tasks/dell-wsman-delete-volume-updateXml.js on lines 5..15
      lib/task-data/base-tasks/dell-wsman-getXml.js on lines 5..15
      lib/task-data/base-tasks/dell-wsman-simple-update-firmware.js on lines 5..15
      lib/task-data/base-tasks/dell-wsman-update-lookups-base.js on lines 5..12
      lib/task-data/base-tasks/download-http-file-base.js on lines 5..12
      lib/task-data/base-tasks/generate-enclosure.js on lines 5..12
      lib/task-data/base-tasks/generate-sku.js on lines 5..12
      lib/task-data/base-tasks/ipmi-sel-poller-alert.js on lines 5..12
      lib/task-data/base-tasks/ipmi.js on lines 5..12
      lib/task-data/base-tasks/node-discovered-alert.js on lines 5..12
      lib/task-data/base-tasks/password-generation.js on lines 5..12
      lib/task-data/base-tasks/pdu-node-relations.js on lines 5..12
      lib/task-data/base-tasks/redfish-update-lookups.js on lines 5..12
      lib/task-data/base-tasks/redfish.js on lines 5..12
      lib/task-data/base-tasks/run-workitems.js on lines 5..12
      lib/task-data/base-tasks/snmp-node-update.js on lines 5..12
      lib/task-data/base-tasks/snmp-poller-alert.js on lines 5..12
      lib/task-data/base-tasks/snmp-update-lookups.js on lines 5..12
      lib/task-data/base-tasks/snmp.js on lines 5..12
      lib/task-data/base-tasks/switch-node-relations.js on lines 5..12
      lib/task-data/base-tasks/test-poller.js on lines 5..12
      lib/task-data/base-tasks/ucs.js on lines 5..12
      lib/task-data/base-tasks/validate-ssh.js on lines 6..13
      lib/task-data/base-tasks/wait-for-notification.js on lines 5..12
      lib/task-data/base-tasks/wsman.js on lines 5..12

      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 45.

      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 35 locations. Consider refactoring.
      Open

      module.exports = {
          friendlyName: 'Test Poller',
          injectableName: 'Task.Base.Test.Poller',
          runJob: 'Job.Test.Poller',
          requiredOptions: [],
      Severity: Major
      Found in lib/task-data/base-tasks/test-poller.js and 34 other locations - About 30 mins to fix
      lib/task-data/base-tasks/add-hotspare.js on lines 3..13
      lib/task-data/base-tasks/add-volume.js on lines 3..13
      lib/task-data/base-tasks/clean-workitems.js on lines 5..12
      lib/task-data/base-tasks/copy-key.js on lines 6..13
      lib/task-data/base-tasks/delete-volume.js on lines 3..13
      lib/task-data/base-tasks/dell-wsman-RAID.js on lines 5..15
      lib/task-data/base-tasks/dell-wsman-add-hotspare-updatexml.js on lines 5..12
      lib/task-data/base-tasks/dell-wsman-add-volume-updateXml.js on lines 5..15
      lib/task-data/base-tasks/dell-wsman-configure-redfish-alert.js on lines 5..13
      lib/task-data/base-tasks/dell-wsman-delete-volume-updateXml.js on lines 5..15
      lib/task-data/base-tasks/dell-wsman-getXml.js on lines 5..15
      lib/task-data/base-tasks/dell-wsman-simple-update-firmware.js on lines 5..15
      lib/task-data/base-tasks/dell-wsman-update-lookups-base.js on lines 5..12
      lib/task-data/base-tasks/download-http-file-base.js on lines 5..12
      lib/task-data/base-tasks/generate-enclosure.js on lines 5..12
      lib/task-data/base-tasks/generate-sku.js on lines 5..12
      lib/task-data/base-tasks/ipmi-sdr-poller-alert.js on lines 5..12
      lib/task-data/base-tasks/ipmi-sel-poller-alert.js on lines 5..12
      lib/task-data/base-tasks/ipmi.js on lines 5..12
      lib/task-data/base-tasks/node-discovered-alert.js on lines 5..12
      lib/task-data/base-tasks/password-generation.js on lines 5..12
      lib/task-data/base-tasks/pdu-node-relations.js on lines 5..12
      lib/task-data/base-tasks/redfish-update-lookups.js on lines 5..12
      lib/task-data/base-tasks/redfish.js on lines 5..12
      lib/task-data/base-tasks/run-workitems.js on lines 5..12
      lib/task-data/base-tasks/snmp-node-update.js on lines 5..12
      lib/task-data/base-tasks/snmp-poller-alert.js on lines 5..12
      lib/task-data/base-tasks/snmp-update-lookups.js on lines 5..12
      lib/task-data/base-tasks/snmp.js on lines 5..12
      lib/task-data/base-tasks/switch-node-relations.js on lines 5..12
      lib/task-data/base-tasks/ucs.js on lines 5..12
      lib/task-data/base-tasks/validate-ssh.js on lines 6..13
      lib/task-data/base-tasks/wait-for-notification.js on lines 5..12
      lib/task-data/base-tasks/wsman.js on lines 5..12

      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 45.

      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

      Avoid too many return statements within this function.
      Open

                      return Promise.resolve({ source: bmcsource, error: e });
      Severity: Major
      Found in lib/utils/job-utils/command-parser.js - About 30 mins to fix

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

        module.exports = {
            friendlyName: 'Switch nodes Relations',
            injectableName: 'Task.Base.Catalog.SwitchRelations',
            runJob: 'Job.Catalog.SwitchRelations',
            requiredOptions: [],
        Severity: Major
        Found in lib/task-data/base-tasks/switch-node-relations.js and 34 other locations - About 30 mins to fix
        lib/task-data/base-tasks/add-hotspare.js on lines 3..13
        lib/task-data/base-tasks/add-volume.js on lines 3..13
        lib/task-data/base-tasks/clean-workitems.js on lines 5..12
        lib/task-data/base-tasks/copy-key.js on lines 6..13
        lib/task-data/base-tasks/delete-volume.js on lines 3..13
        lib/task-data/base-tasks/dell-wsman-RAID.js on lines 5..15
        lib/task-data/base-tasks/dell-wsman-add-hotspare-updatexml.js on lines 5..12
        lib/task-data/base-tasks/dell-wsman-add-volume-updateXml.js on lines 5..15
        lib/task-data/base-tasks/dell-wsman-configure-redfish-alert.js on lines 5..13
        lib/task-data/base-tasks/dell-wsman-delete-volume-updateXml.js on lines 5..15
        lib/task-data/base-tasks/dell-wsman-getXml.js on lines 5..15
        lib/task-data/base-tasks/dell-wsman-simple-update-firmware.js on lines 5..15
        lib/task-data/base-tasks/dell-wsman-update-lookups-base.js on lines 5..12
        lib/task-data/base-tasks/download-http-file-base.js on lines 5..12
        lib/task-data/base-tasks/generate-enclosure.js on lines 5..12
        lib/task-data/base-tasks/generate-sku.js on lines 5..12
        lib/task-data/base-tasks/ipmi-sdr-poller-alert.js on lines 5..12
        lib/task-data/base-tasks/ipmi-sel-poller-alert.js on lines 5..12
        lib/task-data/base-tasks/ipmi.js on lines 5..12
        lib/task-data/base-tasks/node-discovered-alert.js on lines 5..12
        lib/task-data/base-tasks/password-generation.js on lines 5..12
        lib/task-data/base-tasks/pdu-node-relations.js on lines 5..12
        lib/task-data/base-tasks/redfish-update-lookups.js on lines 5..12
        lib/task-data/base-tasks/redfish.js on lines 5..12
        lib/task-data/base-tasks/run-workitems.js on lines 5..12
        lib/task-data/base-tasks/snmp-node-update.js on lines 5..12
        lib/task-data/base-tasks/snmp-poller-alert.js on lines 5..12
        lib/task-data/base-tasks/snmp-update-lookups.js on lines 5..12
        lib/task-data/base-tasks/snmp.js on lines 5..12
        lib/task-data/base-tasks/test-poller.js on lines 5..12
        lib/task-data/base-tasks/ucs.js on lines 5..12
        lib/task-data/base-tasks/validate-ssh.js on lines 6..13
        lib/task-data/base-tasks/wait-for-notification.js on lines 5..12
        lib/task-data/base-tasks/wsman.js on lines 5..12

        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 45.

        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 35 locations. Consider refactoring.
        Open

        module.exports = {
            friendlyName: 'Snmp Update Lookups',
            injectableName: 'Task.Base.Snmp.Update.Lookups',
            runJob: 'Job.Snmp.Update.Lookups',
            requiredOptions: [],
        Severity: Major
        Found in lib/task-data/base-tasks/snmp-update-lookups.js and 34 other locations - About 30 mins to fix
        lib/task-data/base-tasks/add-hotspare.js on lines 3..13
        lib/task-data/base-tasks/add-volume.js on lines 3..13
        lib/task-data/base-tasks/clean-workitems.js on lines 5..12
        lib/task-data/base-tasks/copy-key.js on lines 6..13
        lib/task-data/base-tasks/delete-volume.js on lines 3..13
        lib/task-data/base-tasks/dell-wsman-RAID.js on lines 5..15
        lib/task-data/base-tasks/dell-wsman-add-hotspare-updatexml.js on lines 5..12
        lib/task-data/base-tasks/dell-wsman-add-volume-updateXml.js on lines 5..15
        lib/task-data/base-tasks/dell-wsman-configure-redfish-alert.js on lines 5..13
        lib/task-data/base-tasks/dell-wsman-delete-volume-updateXml.js on lines 5..15
        lib/task-data/base-tasks/dell-wsman-getXml.js on lines 5..15
        lib/task-data/base-tasks/dell-wsman-simple-update-firmware.js on lines 5..15
        lib/task-data/base-tasks/dell-wsman-update-lookups-base.js on lines 5..12
        lib/task-data/base-tasks/download-http-file-base.js on lines 5..12
        lib/task-data/base-tasks/generate-enclosure.js on lines 5..12
        lib/task-data/base-tasks/generate-sku.js on lines 5..12
        lib/task-data/base-tasks/ipmi-sdr-poller-alert.js on lines 5..12
        lib/task-data/base-tasks/ipmi-sel-poller-alert.js on lines 5..12
        lib/task-data/base-tasks/ipmi.js on lines 5..12
        lib/task-data/base-tasks/node-discovered-alert.js on lines 5..12
        lib/task-data/base-tasks/password-generation.js on lines 5..12
        lib/task-data/base-tasks/pdu-node-relations.js on lines 5..12
        lib/task-data/base-tasks/redfish-update-lookups.js on lines 5..12
        lib/task-data/base-tasks/redfish.js on lines 5..12
        lib/task-data/base-tasks/run-workitems.js on lines 5..12
        lib/task-data/base-tasks/snmp-node-update.js on lines 5..12
        lib/task-data/base-tasks/snmp-poller-alert.js on lines 5..12
        lib/task-data/base-tasks/snmp.js on lines 5..12
        lib/task-data/base-tasks/switch-node-relations.js on lines 5..12
        lib/task-data/base-tasks/test-poller.js on lines 5..12
        lib/task-data/base-tasks/ucs.js on lines 5..12
        lib/task-data/base-tasks/validate-ssh.js on lines 6..13
        lib/task-data/base-tasks/wait-for-notification.js on lines 5..12
        lib/task-data/base-tasks/wsman.js on lines 5..12

        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 45.

        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 35 locations. Consider refactoring.
        Open

        module.exports = {
            friendlyName: 'Ipmi Requester',
            injectableName: 'Task.Base.Ipmi',
            runJob: 'Job.Ipmi',
            requiredOptions: [],
        Severity: Major
        Found in lib/task-data/base-tasks/ipmi.js and 34 other locations - About 30 mins to fix
        lib/task-data/base-tasks/add-hotspare.js on lines 3..13
        lib/task-data/base-tasks/add-volume.js on lines 3..13
        lib/task-data/base-tasks/clean-workitems.js on lines 5..12
        lib/task-data/base-tasks/copy-key.js on lines 6..13
        lib/task-data/base-tasks/delete-volume.js on lines 3..13
        lib/task-data/base-tasks/dell-wsman-RAID.js on lines 5..15
        lib/task-data/base-tasks/dell-wsman-add-hotspare-updatexml.js on lines 5..12
        lib/task-data/base-tasks/dell-wsman-add-volume-updateXml.js on lines 5..15
        lib/task-data/base-tasks/dell-wsman-configure-redfish-alert.js on lines 5..13
        lib/task-data/base-tasks/dell-wsman-delete-volume-updateXml.js on lines 5..15
        lib/task-data/base-tasks/dell-wsman-getXml.js on lines 5..15
        lib/task-data/base-tasks/dell-wsman-simple-update-firmware.js on lines 5..15
        lib/task-data/base-tasks/dell-wsman-update-lookups-base.js on lines 5..12
        lib/task-data/base-tasks/download-http-file-base.js on lines 5..12
        lib/task-data/base-tasks/generate-enclosure.js on lines 5..12
        lib/task-data/base-tasks/generate-sku.js on lines 5..12
        lib/task-data/base-tasks/ipmi-sdr-poller-alert.js on lines 5..12
        lib/task-data/base-tasks/ipmi-sel-poller-alert.js on lines 5..12
        lib/task-data/base-tasks/node-discovered-alert.js on lines 5..12
        lib/task-data/base-tasks/password-generation.js on lines 5..12
        lib/task-data/base-tasks/pdu-node-relations.js on lines 5..12
        lib/task-data/base-tasks/redfish-update-lookups.js on lines 5..12
        lib/task-data/base-tasks/redfish.js on lines 5..12
        lib/task-data/base-tasks/run-workitems.js on lines 5..12
        lib/task-data/base-tasks/snmp-node-update.js on lines 5..12
        lib/task-data/base-tasks/snmp-poller-alert.js on lines 5..12
        lib/task-data/base-tasks/snmp-update-lookups.js on lines 5..12
        lib/task-data/base-tasks/snmp.js on lines 5..12
        lib/task-data/base-tasks/switch-node-relations.js on lines 5..12
        lib/task-data/base-tasks/test-poller.js on lines 5..12
        lib/task-data/base-tasks/ucs.js on lines 5..12
        lib/task-data/base-tasks/validate-ssh.js on lines 6..13
        lib/task-data/base-tasks/wait-for-notification.js on lines 5..12
        lib/task-data/base-tasks/wsman.js on lines 5..12

        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 45.

        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

                            _.set(self.resultCache, keyName, _.reduce(result, function(res, obj) {
                                _.forEach(obj.values, function(val, key) {
                                    res[key] = val;
                                });
                                return res;
        Severity: Minor
        Found in lib/jobs/snmp-job.js and 1 other location - About 30 mins to fix
        lib/jobs/snmp-job.js on lines 337..342

        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 45.

        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

        Avoid too many return statements within this function.
        Open

                        return Promise.resolve({ source: userSummarySource, error: e });
        Severity: Major
        Found in lib/utils/job-utils/command-parser.js - About 30 mins to fix

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

          module.exports = {
              friendlyName: 'Generate a BMC password',
              injectableName: 'Task.Base.Generate.Password',
              runJob: 'Job.BMC.Password',
              requiredOptions: [],
          Severity: Major
          Found in lib/task-data/base-tasks/password-generation.js and 34 other locations - About 30 mins to fix
          lib/task-data/base-tasks/add-hotspare.js on lines 3..13
          lib/task-data/base-tasks/add-volume.js on lines 3..13
          lib/task-data/base-tasks/clean-workitems.js on lines 5..12
          lib/task-data/base-tasks/copy-key.js on lines 6..13
          lib/task-data/base-tasks/delete-volume.js on lines 3..13
          lib/task-data/base-tasks/dell-wsman-RAID.js on lines 5..15
          lib/task-data/base-tasks/dell-wsman-add-hotspare-updatexml.js on lines 5..12
          lib/task-data/base-tasks/dell-wsman-add-volume-updateXml.js on lines 5..15
          lib/task-data/base-tasks/dell-wsman-configure-redfish-alert.js on lines 5..13
          lib/task-data/base-tasks/dell-wsman-delete-volume-updateXml.js on lines 5..15
          lib/task-data/base-tasks/dell-wsman-getXml.js on lines 5..15
          lib/task-data/base-tasks/dell-wsman-simple-update-firmware.js on lines 5..15
          lib/task-data/base-tasks/dell-wsman-update-lookups-base.js on lines 5..12
          lib/task-data/base-tasks/download-http-file-base.js on lines 5..12
          lib/task-data/base-tasks/generate-enclosure.js on lines 5..12
          lib/task-data/base-tasks/generate-sku.js on lines 5..12
          lib/task-data/base-tasks/ipmi-sdr-poller-alert.js on lines 5..12
          lib/task-data/base-tasks/ipmi-sel-poller-alert.js on lines 5..12
          lib/task-data/base-tasks/ipmi.js on lines 5..12
          lib/task-data/base-tasks/node-discovered-alert.js on lines 5..12
          lib/task-data/base-tasks/pdu-node-relations.js on lines 5..12
          lib/task-data/base-tasks/redfish-update-lookups.js on lines 5..12
          lib/task-data/base-tasks/redfish.js on lines 5..12
          lib/task-data/base-tasks/run-workitems.js on lines 5..12
          lib/task-data/base-tasks/snmp-node-update.js on lines 5..12
          lib/task-data/base-tasks/snmp-poller-alert.js on lines 5..12
          lib/task-data/base-tasks/snmp-update-lookups.js on lines 5..12
          lib/task-data/base-tasks/snmp.js on lines 5..12
          lib/task-data/base-tasks/switch-node-relations.js on lines 5..12
          lib/task-data/base-tasks/test-poller.js on lines 5..12
          lib/task-data/base-tasks/ucs.js on lines 5..12
          lib/task-data/base-tasks/validate-ssh.js on lines 6..13
          lib/task-data/base-tasks/wait-for-notification.js on lines 5..12
          lib/task-data/base-tasks/wsman.js on lines 5..12

          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 45.

          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 35 locations. Consider refactoring.
          Open

          module.exports = {
              friendlyName: 'Dell Wsman RAID Base Task',
              injectableName: 'Task.Base.Dell.Wsman.RAID',
              runJob: 'Job.Dell.Wsman.RAID',
              requiredOptions: [
          Severity: Major
          Found in lib/task-data/base-tasks/dell-wsman-RAID.js and 34 other locations - About 30 mins to fix
          lib/task-data/base-tasks/add-hotspare.js on lines 3..13
          lib/task-data/base-tasks/add-volume.js on lines 3..13
          lib/task-data/base-tasks/clean-workitems.js on lines 5..12
          lib/task-data/base-tasks/copy-key.js on lines 6..13
          lib/task-data/base-tasks/delete-volume.js on lines 3..13
          lib/task-data/base-tasks/dell-wsman-add-hotspare-updatexml.js on lines 5..12
          lib/task-data/base-tasks/dell-wsman-add-volume-updateXml.js on lines 5..15
          lib/task-data/base-tasks/dell-wsman-configure-redfish-alert.js on lines 5..13
          lib/task-data/base-tasks/dell-wsman-delete-volume-updateXml.js on lines 5..15
          lib/task-data/base-tasks/dell-wsman-getXml.js on lines 5..15
          lib/task-data/base-tasks/dell-wsman-simple-update-firmware.js on lines 5..15
          lib/task-data/base-tasks/dell-wsman-update-lookups-base.js on lines 5..12
          lib/task-data/base-tasks/download-http-file-base.js on lines 5..12
          lib/task-data/base-tasks/generate-enclosure.js on lines 5..12
          lib/task-data/base-tasks/generate-sku.js on lines 5..12
          lib/task-data/base-tasks/ipmi-sdr-poller-alert.js on lines 5..12
          lib/task-data/base-tasks/ipmi-sel-poller-alert.js on lines 5..12
          lib/task-data/base-tasks/ipmi.js on lines 5..12
          lib/task-data/base-tasks/node-discovered-alert.js on lines 5..12
          lib/task-data/base-tasks/password-generation.js on lines 5..12
          lib/task-data/base-tasks/pdu-node-relations.js on lines 5..12
          lib/task-data/base-tasks/redfish-update-lookups.js on lines 5..12
          lib/task-data/base-tasks/redfish.js on lines 5..12
          lib/task-data/base-tasks/run-workitems.js on lines 5..12
          lib/task-data/base-tasks/snmp-node-update.js on lines 5..12
          lib/task-data/base-tasks/snmp-poller-alert.js on lines 5..12
          lib/task-data/base-tasks/snmp-update-lookups.js on lines 5..12
          lib/task-data/base-tasks/snmp.js on lines 5..12
          lib/task-data/base-tasks/switch-node-relations.js on lines 5..12
          lib/task-data/base-tasks/test-poller.js on lines 5..12
          lib/task-data/base-tasks/ucs.js on lines 5..12
          lib/task-data/base-tasks/validate-ssh.js on lines 6..13
          lib/task-data/base-tasks/wait-for-notification.js on lines 5..12
          lib/task-data/base-tasks/wsman.js on lines 5..12

          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 45.

          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 35 locations. Consider refactoring.
          Open

          module.exports = {
              friendlyName: 'Add Hotspare Base Task',
              injectableName: 'Task.Base.Add.Hotspare',
              runJob: 'Job.Add.Hotspare',
              requiredOptions: [
          Severity: Major
          Found in lib/task-data/base-tasks/add-hotspare.js and 34 other locations - About 30 mins to fix
          lib/task-data/base-tasks/add-volume.js on lines 3..13
          lib/task-data/base-tasks/clean-workitems.js on lines 5..12
          lib/task-data/base-tasks/copy-key.js on lines 6..13
          lib/task-data/base-tasks/delete-volume.js on lines 3..13
          lib/task-data/base-tasks/dell-wsman-RAID.js on lines 5..15
          lib/task-data/base-tasks/dell-wsman-add-hotspare-updatexml.js on lines 5..12
          lib/task-data/base-tasks/dell-wsman-add-volume-updateXml.js on lines 5..15
          lib/task-data/base-tasks/dell-wsman-configure-redfish-alert.js on lines 5..13
          lib/task-data/base-tasks/dell-wsman-delete-volume-updateXml.js on lines 5..15
          lib/task-data/base-tasks/dell-wsman-getXml.js on lines 5..15
          lib/task-data/base-tasks/dell-wsman-simple-update-firmware.js on lines 5..15
          lib/task-data/base-tasks/dell-wsman-update-lookups-base.js on lines 5..12
          lib/task-data/base-tasks/download-http-file-base.js on lines 5..12
          lib/task-data/base-tasks/generate-enclosure.js on lines 5..12
          lib/task-data/base-tasks/generate-sku.js on lines 5..12
          lib/task-data/base-tasks/ipmi-sdr-poller-alert.js on lines 5..12
          lib/task-data/base-tasks/ipmi-sel-poller-alert.js on lines 5..12
          lib/task-data/base-tasks/ipmi.js on lines 5..12
          lib/task-data/base-tasks/node-discovered-alert.js on lines 5..12
          lib/task-data/base-tasks/password-generation.js on lines 5..12
          lib/task-data/base-tasks/pdu-node-relations.js on lines 5..12
          lib/task-data/base-tasks/redfish-update-lookups.js on lines 5..12
          lib/task-data/base-tasks/redfish.js on lines 5..12
          lib/task-data/base-tasks/run-workitems.js on lines 5..12
          lib/task-data/base-tasks/snmp-node-update.js on lines 5..12
          lib/task-data/base-tasks/snmp-poller-alert.js on lines 5..12
          lib/task-data/base-tasks/snmp-update-lookups.js on lines 5..12
          lib/task-data/base-tasks/snmp.js on lines 5..12
          lib/task-data/base-tasks/switch-node-relations.js on lines 5..12
          lib/task-data/base-tasks/test-poller.js on lines 5..12
          lib/task-data/base-tasks/ucs.js on lines 5..12
          lib/task-data/base-tasks/validate-ssh.js on lines 6..13
          lib/task-data/base-tasks/wait-for-notification.js on lines 5..12
          lib/task-data/base-tasks/wsman.js on lines 5..12

          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 45.

          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 35 locations. Consider refactoring.
          Open

          module.exports = {
              friendlyName: 'Copy Key',
              injectableName: 'Task.Base.Ssh.CopyKey',
              runJob: 'Job.CopySshKey',
              requiredOptions: [],
          Severity: Major
          Found in lib/task-data/base-tasks/copy-key.js and 34 other locations - About 30 mins to fix
          lib/task-data/base-tasks/add-hotspare.js on lines 3..13
          lib/task-data/base-tasks/add-volume.js on lines 3..13
          lib/task-data/base-tasks/clean-workitems.js on lines 5..12
          lib/task-data/base-tasks/delete-volume.js on lines 3..13
          lib/task-data/base-tasks/dell-wsman-RAID.js on lines 5..15
          lib/task-data/base-tasks/dell-wsman-add-hotspare-updatexml.js on lines 5..12
          lib/task-data/base-tasks/dell-wsman-add-volume-updateXml.js on lines 5..15
          lib/task-data/base-tasks/dell-wsman-configure-redfish-alert.js on lines 5..13
          lib/task-data/base-tasks/dell-wsman-delete-volume-updateXml.js on lines 5..15
          lib/task-data/base-tasks/dell-wsman-getXml.js on lines 5..15
          lib/task-data/base-tasks/dell-wsman-simple-update-firmware.js on lines 5..15
          lib/task-data/base-tasks/dell-wsman-update-lookups-base.js on lines 5..12
          lib/task-data/base-tasks/download-http-file-base.js on lines 5..12
          lib/task-data/base-tasks/generate-enclosure.js on lines 5..12
          lib/task-data/base-tasks/generate-sku.js on lines 5..12
          lib/task-data/base-tasks/ipmi-sdr-poller-alert.js on lines 5..12
          lib/task-data/base-tasks/ipmi-sel-poller-alert.js on lines 5..12
          lib/task-data/base-tasks/ipmi.js on lines 5..12
          lib/task-data/base-tasks/node-discovered-alert.js on lines 5..12
          lib/task-data/base-tasks/password-generation.js on lines 5..12
          lib/task-data/base-tasks/pdu-node-relations.js on lines 5..12
          lib/task-data/base-tasks/redfish-update-lookups.js on lines 5..12
          lib/task-data/base-tasks/redfish.js on lines 5..12
          lib/task-data/base-tasks/run-workitems.js on lines 5..12
          lib/task-data/base-tasks/snmp-node-update.js on lines 5..12
          lib/task-data/base-tasks/snmp-poller-alert.js on lines 5..12
          lib/task-data/base-tasks/snmp-update-lookups.js on lines 5..12
          lib/task-data/base-tasks/snmp.js on lines 5..12
          lib/task-data/base-tasks/switch-node-relations.js on lines 5..12
          lib/task-data/base-tasks/test-poller.js on lines 5..12
          lib/task-data/base-tasks/ucs.js on lines 5..12
          lib/task-data/base-tasks/validate-ssh.js on lines 6..13
          lib/task-data/base-tasks/wait-for-notification.js on lines 5..12
          lib/task-data/base-tasks/wsman.js on lines 5..12

          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 45.

          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 35 locations. Consider refactoring.
          Open

          module.exports = {
              friendlyName: 'Base Ucs Task',
              injectableName: 'Task.Base.Ucs',
              runJob: 'Job.Ucs',
              requiredOptions: [],
          Severity: Major
          Found in lib/task-data/base-tasks/ucs.js and 34 other locations - About 30 mins to fix
          lib/task-data/base-tasks/add-hotspare.js on lines 3..13
          lib/task-data/base-tasks/add-volume.js on lines 3..13
          lib/task-data/base-tasks/clean-workitems.js on lines 5..12
          lib/task-data/base-tasks/copy-key.js on lines 6..13
          lib/task-data/base-tasks/delete-volume.js on lines 3..13
          lib/task-data/base-tasks/dell-wsman-RAID.js on lines 5..15
          lib/task-data/base-tasks/dell-wsman-add-hotspare-updatexml.js on lines 5..12
          lib/task-data/base-tasks/dell-wsman-add-volume-updateXml.js on lines 5..15
          lib/task-data/base-tasks/dell-wsman-configure-redfish-alert.js on lines 5..13
          lib/task-data/base-tasks/dell-wsman-delete-volume-updateXml.js on lines 5..15
          lib/task-data/base-tasks/dell-wsman-getXml.js on lines 5..15
          lib/task-data/base-tasks/dell-wsman-simple-update-firmware.js on lines 5..15
          lib/task-data/base-tasks/dell-wsman-update-lookups-base.js on lines 5..12
          lib/task-data/base-tasks/download-http-file-base.js on lines 5..12
          lib/task-data/base-tasks/generate-enclosure.js on lines 5..12
          lib/task-data/base-tasks/generate-sku.js on lines 5..12
          lib/task-data/base-tasks/ipmi-sdr-poller-alert.js on lines 5..12
          lib/task-data/base-tasks/ipmi-sel-poller-alert.js on lines 5..12
          lib/task-data/base-tasks/ipmi.js on lines 5..12
          lib/task-data/base-tasks/node-discovered-alert.js on lines 5..12
          lib/task-data/base-tasks/password-generation.js on lines 5..12
          lib/task-data/base-tasks/pdu-node-relations.js on lines 5..12
          lib/task-data/base-tasks/redfish-update-lookups.js on lines 5..12
          lib/task-data/base-tasks/redfish.js on lines 5..12
          lib/task-data/base-tasks/run-workitems.js on lines 5..12
          lib/task-data/base-tasks/snmp-node-update.js on lines 5..12
          lib/task-data/base-tasks/snmp-poller-alert.js on lines 5..12
          lib/task-data/base-tasks/snmp-update-lookups.js on lines 5..12
          lib/task-data/base-tasks/snmp.js on lines 5..12
          lib/task-data/base-tasks/switch-node-relations.js on lines 5..12
          lib/task-data/base-tasks/test-poller.js on lines 5..12
          lib/task-data/base-tasks/validate-ssh.js on lines 6..13
          lib/task-data/base-tasks/wait-for-notification.js on lines 5..12
          lib/task-data/base-tasks/wsman.js on lines 5..12

          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 45.

          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 35 locations. Consider refactoring.
          Open

          module.exports = {
              friendlyName: 'Generate SKU',
              injectableName: 'Task.Base.Catalog.GenerateSku',
              runJob: 'Job.Catalog.GenerateSku',
              requiredOptions: [],
          Severity: Major
          Found in lib/task-data/base-tasks/generate-sku.js and 34 other locations - About 30 mins to fix
          lib/task-data/base-tasks/add-hotspare.js on lines 3..13
          lib/task-data/base-tasks/add-volume.js on lines 3..13
          lib/task-data/base-tasks/clean-workitems.js on lines 5..12
          lib/task-data/base-tasks/copy-key.js on lines 6..13
          lib/task-data/base-tasks/delete-volume.js on lines 3..13
          lib/task-data/base-tasks/dell-wsman-RAID.js on lines 5..15
          lib/task-data/base-tasks/dell-wsman-add-hotspare-updatexml.js on lines 5..12
          lib/task-data/base-tasks/dell-wsman-add-volume-updateXml.js on lines 5..15
          lib/task-data/base-tasks/dell-wsman-configure-redfish-alert.js on lines 5..13
          lib/task-data/base-tasks/dell-wsman-delete-volume-updateXml.js on lines 5..15
          lib/task-data/base-tasks/dell-wsman-getXml.js on lines 5..15
          lib/task-data/base-tasks/dell-wsman-simple-update-firmware.js on lines 5..15
          lib/task-data/base-tasks/dell-wsman-update-lookups-base.js on lines 5..12
          lib/task-data/base-tasks/download-http-file-base.js on lines 5..12
          lib/task-data/base-tasks/generate-enclosure.js on lines 5..12
          lib/task-data/base-tasks/ipmi-sdr-poller-alert.js on lines 5..12
          lib/task-data/base-tasks/ipmi-sel-poller-alert.js on lines 5..12
          lib/task-data/base-tasks/ipmi.js on lines 5..12
          lib/task-data/base-tasks/node-discovered-alert.js on lines 5..12
          lib/task-data/base-tasks/password-generation.js on lines 5..12
          lib/task-data/base-tasks/pdu-node-relations.js on lines 5..12
          lib/task-data/base-tasks/redfish-update-lookups.js on lines 5..12
          lib/task-data/base-tasks/redfish.js on lines 5..12
          lib/task-data/base-tasks/run-workitems.js on lines 5..12
          lib/task-data/base-tasks/snmp-node-update.js on lines 5..12
          lib/task-data/base-tasks/snmp-poller-alert.js on lines 5..12
          lib/task-data/base-tasks/snmp-update-lookups.js on lines 5..12
          lib/task-data/base-tasks/snmp.js on lines 5..12
          lib/task-data/base-tasks/switch-node-relations.js on lines 5..12
          lib/task-data/base-tasks/test-poller.js on lines 5..12
          lib/task-data/base-tasks/ucs.js on lines 5..12
          lib/task-data/base-tasks/validate-ssh.js on lines 6..13
          lib/task-data/base-tasks/wait-for-notification.js on lines 5..12
          lib/task-data/base-tasks/wsman.js on lines 5..12

          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 45.

          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 35 locations. Consider refactoring.
          Open

          module.exports = {
              friendlyName: 'Run Work Items',
              injectableName: 'Task.Base.WorkItems.Run',
              runJob: 'Job.WorkItems.Run',
              requiredOptions: [],
          Severity: Major
          Found in lib/task-data/base-tasks/run-workitems.js and 34 other locations - About 30 mins to fix
          lib/task-data/base-tasks/add-hotspare.js on lines 3..13
          lib/task-data/base-tasks/add-volume.js on lines 3..13
          lib/task-data/base-tasks/clean-workitems.js on lines 5..12
          lib/task-data/base-tasks/copy-key.js on lines 6..13
          lib/task-data/base-tasks/delete-volume.js on lines 3..13
          lib/task-data/base-tasks/dell-wsman-RAID.js on lines 5..15
          lib/task-data/base-tasks/dell-wsman-add-hotspare-updatexml.js on lines 5..12
          lib/task-data/base-tasks/dell-wsman-add-volume-updateXml.js on lines 5..15
          lib/task-data/base-tasks/dell-wsman-configure-redfish-alert.js on lines 5..13
          lib/task-data/base-tasks/dell-wsman-delete-volume-updateXml.js on lines 5..15
          lib/task-data/base-tasks/dell-wsman-getXml.js on lines 5..15
          lib/task-data/base-tasks/dell-wsman-simple-update-firmware.js on lines 5..15
          lib/task-data/base-tasks/dell-wsman-update-lookups-base.js on lines 5..12
          lib/task-data/base-tasks/download-http-file-base.js on lines 5..12
          lib/task-data/base-tasks/generate-enclosure.js on lines 5..12
          lib/task-data/base-tasks/generate-sku.js on lines 5..12
          lib/task-data/base-tasks/ipmi-sdr-poller-alert.js on lines 5..12
          lib/task-data/base-tasks/ipmi-sel-poller-alert.js on lines 5..12
          lib/task-data/base-tasks/ipmi.js on lines 5..12
          lib/task-data/base-tasks/node-discovered-alert.js on lines 5..12
          lib/task-data/base-tasks/password-generation.js on lines 5..12
          lib/task-data/base-tasks/pdu-node-relations.js on lines 5..12
          lib/task-data/base-tasks/redfish-update-lookups.js on lines 5..12
          lib/task-data/base-tasks/redfish.js on lines 5..12
          lib/task-data/base-tasks/snmp-node-update.js on lines 5..12
          lib/task-data/base-tasks/snmp-poller-alert.js on lines 5..12
          lib/task-data/base-tasks/snmp-update-lookups.js on lines 5..12
          lib/task-data/base-tasks/snmp.js on lines 5..12
          lib/task-data/base-tasks/switch-node-relations.js on lines 5..12
          lib/task-data/base-tasks/test-poller.js on lines 5..12
          lib/task-data/base-tasks/ucs.js on lines 5..12
          lib/task-data/base-tasks/validate-ssh.js on lines 6..13
          lib/task-data/base-tasks/wait-for-notification.js on lines 5..12
          lib/task-data/base-tasks/wsman.js on lines 5..12

          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 45.

          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