RackHD/on-tasks

View on GitHub

Showing 593 of 1,093 total issues

Function commandParserFactory has a Cognitive Complexity of 361 (exceeds 5 allowed). Consider refactoring.
Open

function commandParserFactory(Logger, Promise, _) {
    var logger = Logger.initialize(commandParserFactory);

    function CommandParser() { }

Severity: Minor
Found in lib/utils/job-utils/command-parser.js - About 1 wk 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 commandParserFactory has 1254 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function commandParserFactory(Logger, Promise, _) {
    var logger = Logger.initialize(commandParserFactory);

    function CommandParser() { }

Severity: Major
Found in lib/utils/job-utils/command-parser.js - About 6 days to fix

    Function DellWsmanDiscoveryJobFactory has 765 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function DellWsmanDiscoveryJobFactory(
        BaseJob,
        WsmanTool,
        Logger,
        Promise,
    Severity: Major
    Found in lib/jobs/dell-wsman-discovery.js - About 3 days to fix

      File command-parser.js has 1262 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      // Copyright 2015, EMC, Inc.
      // *** KEEP ONLY THOSE THAT ARE APPLICABLE HERE AND SET TO TRUE ***
      
      'use strict';
      
      
      Severity: Major
      Found in lib/utils/job-utils/command-parser.js - About 3 days to fix

        Function RedfishDiscoveryListJobFactory has 601 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        function RedfishDiscoveryListJobFactory(
            eventsProtocol,
            BaseJob,
            Logger,
            Promise,
        Severity: Major
        Found in lib/jobs/redfish-discovery-list.js - About 3 days to fix

          Function baseJobFactory has 541 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          function baseJobFactory(
              eventsProtocol,
              taskProtocol,
              encryption,
              lookup,
          Severity: Major
          Found in lib/jobs/base-job.js - About 2 days to fix

            Function taskGraphFactory has 475 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            function taskGraphFactory(
                taskLibrary,
                Task,
                store,
                taskMessenger,
            Severity: Major
            Found in lib/task-graph.js - About 2 days to fix

              Function factory has 453 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              function factory(
                  configuration,
                  Logger,
                  assert,
                  Errors,
              Severity: Major
              Found in lib/task.js - About 2 days to fix

                Function redfishJobFactory has 441 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                function redfishJobFactory(
                    BaseJob,
                    Logger,
                    util,
                    assert,
                Severity: Major
                Found in lib/jobs/redfish-job.js - About 2 days to fix

                  File dell-wsman-discovery.js has 804 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  // Copyright 2016, DELL EMC, Inc.
                  
                  'use strict';
                  //jshint ignore: start
                  
                  
                  Severity: Major
                  Found in lib/jobs/dell-wsman-discovery.js - About 1 day to fix

                    Function factory has a Cognitive Complexity of 95 (exceeds 5 allowed). Consider refactoring.
                    Open

                    function factory(
                        configuration,
                        Logger,
                        assert,
                        Errors,
                    Severity: Minor
                    Found in lib/task.js - About 1 day 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 GeneralRedfishCatalogJobFactory has 355 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    function GeneralRedfishCatalogJobFactory(
                        eventsProtocol,
                        BaseJob,
                        Logger,
                        Promise,
                    Severity: Major
                    Found in lib/jobs/general-redfish-catalog.js - About 1 day to fix

                      Function EmcRedfishCatalogJobFactory has 346 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      function EmcRedfishCatalogJobFactory(
                          BaseJob,
                          Logger,
                          Promise,
                          assert,
                      Severity: Major
                      Found in lib/jobs/emc-redfish-catalog.js - About 1 day to fix

                        Function racadmFactory has 315 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        function racadmFactory(
                            Promise,
                            parser,
                            ChildProcess,
                            assert,
                        Severity: Major
                        Found in lib/utils/job-utils/racadm-tool.js - About 1 day to fix

                          Function snmpJobFactory has 305 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          function snmpJobFactory(
                              BaseJob,
                              SnmpTool,
                              Constants,
                              Logger,
                          Severity: Major
                          Found in lib/jobs/snmp-job.js - About 1 day to fix

                            Function ipmiJobFactory has 293 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            function ipmiJobFactory(
                                BaseJob,
                                ipmitool,
                                parser,
                                Logger,
                            Severity: Major
                            Found in lib/jobs/ipmi-job.js - About 1 day to fix

                              File redfish-discovery-list.js has 632 lines of code (exceeds 250 allowed). Consider refactoring.
                              Open

                              // Copyright 2017, Dell EMC, Inc.
                              
                              'use strict';
                              
                              var di = require('di'),
                              Severity: Major
                              Found in lib/jobs/redfish-discovery-list.js - About 1 day to fix

                                Function obmServiceFactory has 262 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                function obmServiceFactory(
                                    Promise,
                                    _,
                                    injector,
                                    assert,
                                Severity: Major
                                Found in lib/services/obm-service.js - About 1 day to fix

                                  Function DellWsmanDiscoveryJobFactory has a Cognitive Complexity of 66 (exceeds 5 allowed). Consider refactoring.
                                  Open

                                  function DellWsmanDiscoveryJobFactory(
                                      BaseJob,
                                      WsmanTool,
                                      Logger,
                                      Promise,
                                  Severity: Minor
                                  Found in lib/jobs/dell-wsman-discovery.js - About 1 day 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 RedfishDiscoveryJobFactory has 256 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                  function RedfishDiscoveryJobFactory(
                                      BaseJob,
                                      Logger,
                                      Promise,
                                      assert,
                                  Severity: Major
                                  Found in lib/jobs/redfish-discovery.js - About 1 day to fix
                                    Severity
                                    Category
                                    Status
                                    Source
                                    Language