RackHD/on-tasks

View on GitHub

Showing 593 of 1,093 total issues

Function snmpPduPowerMetricFactory has 254 lines of code (exceeds 25 allowed). Consider refactoring.
Open

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

    File base-job.js has 574 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    // Copyright 2015, EMC, Inc.
    
    'use strict';
    
    var di = require('di');
    Severity: Major
    Found in lib/jobs/base-job.js - About 1 day to fix

      Function WsmanSimpleFirmwareUpdateJobFactory has 241 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function WsmanSimpleFirmwareUpdateJobFactory(
          BaseJob,
          WsmanTool,
          Logger,
          util,
      Severity: Major
      Found in lib/jobs/dell-wsman-simple-update-firmware.js - About 1 day to fix

        Function snmpJobFactory has a Cognitive Complexity of 59 (exceeds 5 allowed). Consider refactoring.
        Open

        function snmpJobFactory(
            BaseJob,
            SnmpTool,
            Constants,
            Logger,
        Severity: Minor
        Found in lib/jobs/snmp-job.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 searchCatalogDataFactory has 227 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        function searchCatalogDataFactory(
            assert,
            _,
            waterline,
            Promise
        Severity: Major
        Found in lib/utils/job-utils/catalog-searcher.js - About 1 day to fix

          Function secureEraseJobFactory has 220 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          function secureEraseJobFactory(
              BaseJob,
              Logger,
              Promise,
              assert,
          Severity: Major
          Found in lib/jobs/secure-erase-drive.js - About 1 day to fix

            Function EmcComposeSystemJobFactory has 218 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

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

              Function diagToolFactory has 216 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              function diagToolFactory(Promise, _, Logger, assert) {
              
                  function DiagToolFactory(settings, nodeId) {
                      assert.isIP(settings.host, 4);
                      this.server = "%s://%s:%s".format(
              Severity: Major
              Found in lib/utils/job-utils/diag-tool.js - About 1 day to fix

                Function runWorkItemsJobFactory has 209 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                function runWorkItemsJobFactory(
                    BaseJob,
                    waterline,
                    Logger,
                    util,
                Severity: Major
                Found in lib/jobs/run-work-items.js - About 1 day to fix

                  Function baseJobFactory has a Cognitive Complexity of 53 (exceeds 5 allowed). Consider refactoring.
                  Open

                  function baseJobFactory(
                      eventsProtocol,
                      taskProtocol,
                      encryption,
                      lookup,
                  Severity: Minor
                  Found in lib/jobs/base-job.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 parseSensorsDataFactory has 204 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  function parseSensorsDataFactory(assert, _) {
                      //UID status code, 0 = Off, 1 = Temporary On , 2 = On, 3 = reserved
                      var uidStatus = ['Off', 'Temporary On', 'On', 'Reserved'];
                  
                      function parseSelInformationData(selData) {
                  Severity: Major
                  Found in lib/utils/job-utils/ipmi-parser.js - About 1 day to fix

                    File task-graph.js has 506 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    // Copyright 2016, EMC, Inc.
                    'use strict';
                    
                    var di = require('di');
                    
                    
                    Severity: Major
                    Found in lib/task-graph.js - About 1 day to fix

                      Function installOsJobFactory has 199 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      function installOsJobFactory(
                          BaseJob,
                          Logger,
                          assert,
                          util,
                      Severity: Major
                      Found in lib/jobs/install-os.js - About 7 hrs to fix

                        File task.js has 494 lines of code (exceeds 250 allowed). Consider refactoring.
                        Open

                        // Copyright 2015, EMC, Inc.
                        
                        'use strict';
                        
                        var di = require('di');
                        Severity: Minor
                        Found in lib/task.js - About 7 hrs to fix

                          Function commandUtilFactory has 191 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          function commandUtilFactory(
                              parser,
                              Logger,
                              assert,
                              Promise,
                          Severity: Major
                          Found in lib/utils/job-utils/command-util.js - About 7 hrs to fix

                            Function DellWsmanPostDiscoveryJobFactory has 189 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            function DellWsmanPostDiscoveryJobFactory(
                                BaseJob,
                                Logger,
                                Promise,
                                assert,
                            Severity: Major
                            Found in lib/jobs/dell-wsman-post-discovery.js - About 7 hrs to fix

                              File redfish-job.js has 469 lines of code (exceeds 250 allowed). Consider refactoring.
                              Open

                              // Copyright 2016, EMC, Inc.
                              
                              'use strict';
                              
                              var di = require('di'),
                              Severity: Minor
                              Found in lib/jobs/redfish-job.js - About 7 hrs to fix

                                Function parseRacadmDataFactory has 179 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                function parseRacadmDataFactory(
                                    assert,
                                    _,
                                    fs,
                                    Promise
                                Severity: Major
                                Found in lib/utils/job-utils/racadm-parser.js - About 7 hrs to fix

                                  Function UcsDiscoveryJobFactory has 178 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                  function UcsDiscoveryJobFactory(
                                      BaseJob,
                                      Logger,
                                      Promise,
                                      assert,
                                  Severity: Major
                                  Found in lib/jobs/ucs-discovery.js - About 7 hrs to fix

                                    Function taskGraphFactory has a Cognitive Complexity of 46 (exceeds 5 allowed). Consider refactoring.
                                    Open

                                    function taskGraphFactory(
                                        taskLibrary,
                                        Task,
                                        store,
                                        taskMessenger,
                                    Severity: Minor
                                    Found in lib/task-graph.js - About 7 hrs 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