RackHD/on-tasks

View on GitHub

Showing 593 of 1,093 total issues

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

    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

      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

        Avoid too many return statements within this function.
        Open

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

          Avoid too many return statements within this function.
          Open

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

            Function diagUpdateFirmwareFactory has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
            Open

            function diagUpdateFirmwareFactory(
                BaseJob,
                DiagTool,
                Logger,
                util,
            Severity: Minor
            Found in lib/jobs/emc-diag-update-firmware.js - About 25 mins to fix

            Cognitive Complexity

            Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

            A method's cognitive complexity is based on a few simple rules:

            • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
            • Code is considered more complex for each "break in the linear flow of the code"
            • Code is considered more complex when "flow breaking structures are nested"

            Further reading

            Function createDockerAPI has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
            Open

            function createDockerAPI(docker, logger) {
                return {
                    attach: function(id, opts, cb) { docker.getContainer(id).attach(opts, cb); },
                    create: function(opts, cb) { docker.createContainer(opts, cb); },
                    inspect: function(id, opts, cb) { docker.getContainer(id).inspect(opts, cb); },
            Severity: Minor
            Found in lib/jobs/docker-job.js - About 25 mins to fix

            Cognitive Complexity

            Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

            A method's cognitive complexity is based on a few simple rules:

            • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
            • Code is considered more complex for each "break in the linear flow of the code"
            • Code is considered more complex when "flow breaking structures are nested"

            Further reading

            Function LocalCatalogJobFactory has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
            Open

            function LocalCatalogJobFactory(
                BaseJob,
                parser,
                waterline,
                Logger,
            Severity: Minor
            Found in lib/jobs/local-catalog.js - About 25 mins to fix

            Cognitive Complexity

            Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

            A method's cognitive complexity is based on a few simple rules:

            • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
            • Code is considered more complex for each "break in the linear flow of the code"
            • Code is considered more complex when "flow breaking structures are nested"

            Further reading

            Function wsmanJobFactory has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
            Open

            function wsmanJobFactory(
                BaseJob,
                Logger,
                util,
                Promise,
            Severity: Minor
            Found in lib/jobs/wsman-job.js - About 25 mins to fix

            Cognitive Complexity

            Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

            A method's cognitive complexity is based on a few simple rules:

            • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
            • Code is considered more complex for each "break in the linear flow of the code"
            • Code is considered more complex when "flow breaking structures are nested"

            Further reading

            Function RedfishObmServiceFactory has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
            Open

            function RedfishObmServiceFactory(
                BaseObmService, 
                Promise, 
                waterline,
                assert,
            Severity: Minor
            Found in lib/services/redfish-obm-service.js - About 25 mins to fix

            Cognitive Complexity

            Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

            A method's cognitive complexity is based on a few simple rules:

            • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
            • Code is considered more complex for each "break in the linear flow of the code"
            • Code is considered more complex when "flow breaking structures are nested"

            Further reading

            Function snmpProcessorLoadMetricFactory has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
            Open

            function snmpProcessorLoadMetricFactory(
                BaseMetric,
                assert,
                util,
                Promise,
            Severity: Minor
            Found in lib/utils/metrics/snmp-processor-load.js - About 25 mins to fix

            Cognitive Complexity

            Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

            A method's cognitive complexity is based on a few simple rules:

            • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
            • Code is considered more complex for each "break in the linear flow of the code"
            • Code is considered more complex when "flow breaking structures are nested"

            Further reading

            Function snmpPduPowerMetricFactory has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
            Open

            function snmpPduPowerMetricFactory(
                BaseMetric,
                assert,
                util,
                _,
            Severity: Minor
            Found in lib/utils/metrics/snmp-pdu-power-status.js - About 25 mins to fix

            Cognitive Complexity

            Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

            A method's cognitive complexity is based on a few simple rules:

            • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
            • Code is considered more complex for each "break in the linear flow of the code"
            • Code is considered more complex when "flow breaking structures are nested"

            Further reading

            Function amtObmServiceFactory has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
            Open

            function amtObmServiceFactory(Promise, BaseObmService, _) {
                function AmtObmService(options) {
                    BaseObmService.call(this, options);
                    this.requiredKeys = ['host', 'password'];
                }
            Severity: Minor
            Found in lib/services/amt-obm-service.js - About 25 mins to fix

            Cognitive Complexity

            Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

            A method's cognitive complexity is based on a few simple rules:

            • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
            • Code is considered more complex for each "break in the linear flow of the code"
            • Code is considered more complex when "flow breaking structures are nested"

            Further reading

            Severity
            Category
            Status
            Source
            Language