RackHD/on-http

View on GitHub

Showing 204 of 440 total issues

File systems.js has 2035 lines of code (exceeds 250 allowed). Consider refactoring.
Open

// Copyright 2016, EMC, Inc.

'use strict';

var injector = require('../../../index.js').injector;
Severity: Major
Found in lib/api/redfish-1.0/systems.js - About 5 days to fix

    Function nodeApiServiceFactory has 544 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function nodeApiServiceFactory(
        workflowApiService,
        waterline,
        Errors,
        Logger,
    Severity: Major
    Found in lib/services/nodes-api-service.js - About 2 days to fix

      Function skuPackServiceFactory has 516 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function skuPackServiceFactory(
          _,
          waterline,
          Logger,
          FileLoader,
      Severity: Major
      Found in lib/services/sku-pack-service.js - About 2 days to fix

        Function swaggerFactory has 328 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        function swaggerFactory(
            Promise,
            Errors,
            _,
            injector,
        Severity: Major
        Found in lib/services/swagger-api-service.js - About 1 day to fix

          Function nodeApiServiceFactory has a Cognitive Complexity of 70 (exceeds 5 allowed). Consider refactoring.
          Open

          function nodeApiServiceFactory(
              workflowApiService,
              waterline,
              Errors,
              Logger,
          Severity: Minor
          Found in lib/services/nodes-api-service.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 httpServiceFactory has 276 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          function httpServiceFactory(
              eventsProtocol,
              configuration,
              lookupService,
              swagger,
          Severity: Major
          Found in lib/services/http-service.js - About 1 day to fix

            Function NotificationApiServiceFactory has 263 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            function NotificationApiServiceFactory(
                eventsProtocol,
                Logger,
                waterline,
                Errors,
            Severity: Major
            Found in lib/services/notification-api-service.js - About 1 day to fix

              Function obmApiServiceFactory has 255 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              function obmApiServiceFactory(
                  waterline,
                  Logger,
                  eventsProtocol,
                  Promise,
              Severity: Major
              Found in lib/services/obm-api-service.js - About 1 day to fix

                Function accountApiServiceFactory has 251 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                function accountApiServiceFactory(
                    waterline,
                    Errors,
                    Logger,
                    _,
                Severity: Major
                Found in lib/services/account-api-service.js - About 1 day to fix

                  File nodes-api-service.js has 579 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  // Copyright © 2017 Dell Inc. or its subsidiaries. All Rights Reserved.
                  
                  'use strict';
                  
                  var di = require('di');
                  Severity: Major
                  Found in lib/services/nodes-api-service.js - About 1 day to fix

                    File sku-pack-service.js has 564 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

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

                      Function taskgraphApiServiceFactory has 232 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      function taskgraphApiServiceFactory(
                          Errors,
                          configuration,
                          Promise,
                          _
                      Severity: Major
                      Found in lib/services/taskgraph-api-service.js - About 1 day to fix

                        Function swaggerFactory has a Cognitive Complexity of 57 (exceeds 5 allowed). Consider refactoring.
                        Open

                        function swaggerFactory(
                            Promise,
                            Errors,
                            _,
                            injector,
                        Severity: Minor
                        Found in lib/services/swagger-api-service.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 restFactory has 217 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        function restFactory(
                            Serializable,
                            Promise,
                            _,
                            assert,
                        Severity: Major
                        Found in lib/services/rest-api-service.js - About 1 day to fix

                          Function restFactory has a Cognitive Complexity of 54 (exceeds 5 allowed). Consider refactoring.
                          Open

                          function restFactory(
                              Serializable,
                              Promise,
                              _,
                              assert,
                          Severity: Minor
                          Found in lib/services/rest-api-service.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

                          File managers.js has 510 lines of code (exceeds 250 allowed). Consider refactoring.
                          Open

                          // Copyright 2016, EMC, Inc.
                          
                          'use strict';
                          
                          var injector = require('../../../index.js').injector;
                          Severity: Major
                          Found in lib/api/redfish-1.0/managers.js - About 1 day to fix

                            Function authServiceFactory has 200 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            function authServiceFactory(
                                assert,
                                configuration,
                                _,
                                waterline
                            Severity: Major
                            Found in lib/services/auth-service.js - About 1 day to fix

                              File chassis.js has 486 lines of code (exceeds 250 allowed). Consider refactoring.
                              Open

                              // Copyright 2016, EMC, Inc.
                              
                              'use strict';
                              
                              var injector = require('../../../index.js').injector;
                              Severity: Minor
                              Found in lib/api/redfish-1.0/chassis.js - About 7 hrs to fix

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

                                function UPnPServiceFactory(
                                    _,
                                    waterline,
                                    Logger,
                                    Profiles,
                                Severity: Major
                                Found in lib/services/upnp-service.js - About 7 hrs to fix

                                  Function redfishApiServiceFactory has 188 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                  function redfishApiServiceFactory(
                                      configuration,
                                      Logger,
                                      Promise,
                                      _,
                                  Severity: Major
                                  Found in lib/services/redfish-api-service.js - About 7 hrs to fix
                                    Severity
                                    Category
                                    Status
                                    Source
                                    Language