RackHD/on-taskgraph

View on GitHub

Showing 100 of 247 total issues

Function taskSchedulerFactory has 456 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function taskSchedulerFactory(
    eventsProtocol,
    store,
    LeaseExpirationPoller,
    Constants,
Severity: Major
Found in lib/task-scheduler.js - About 2 days to fix

    Function profileApiServiceFactory has 374 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function profileApiServiceFactory(
        Promise,
        workflowApiService,
        taskProtocol,
        eventsProtocol,
    Severity: Major
    Found in lib/services/profile-api-service.js - About 1 day to fix

      Function swaggerFactory has 368 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

        File secure_erase.py has 599 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        #!/usr/bin/env python
        
        # Copyright 2016-2018, Dell EMC, Inc.
        
        # -*- coding: UTF-8 -*-
        Severity: Major
        Found in data/templates/secure_erase.py - About 1 day to fix

          Function taskRunnerFactory has 240 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          function taskRunnerFactory(
              Logger,
              Promise,
              graphProgressService,
              Constants,
          Severity: Major
          Found in lib/task-runner.js - About 1 day to fix

            Function workflowApiServiceFactory has 233 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            function workflowApiServiceFactory(
                taskGraphProtocol,
                taskGraphStore,
                waterline,
                TaskGraph,
            Severity: Major
            Found in lib/services/workflow-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

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

              // Copyright © 2016-2017 Dell Inc. or its subsidiaries.  All Rights Reserved.
              
              'use strict';
              
              var di = require('di');
              Severity: Minor
              Found in lib/task-scheduler.js - About 7 hrs to fix

                Function profileApiServiceFactory has a Cognitive Complexity of 48 (exceeds 5 allowed). Consider refactoring.
                Open

                function profileApiServiceFactory(
                    Promise,
                    workflowApiService,
                    taskProtocol,
                    eventsProtocol,
                Severity: Minor
                Found in lib/services/profile-api-service.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

                File profile-api-service.js has 416 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: Minor
                Found in lib/services/profile-api-service.js - About 6 hrs to fix

                  File swagger-api-service.js has 411 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: Minor
                  Found in lib/services/swagger-api-service.js - About 5 hrs to fix

                    Function completedTaskPollerFactory has 139 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    function completedTaskPollerFactory(
                        store,
                        graphProgressService,
                        eventsProtocol,
                        Logger,
                    Severity: Major
                    Found in lib/completed-task-poller.js - About 5 hrs to fix

                      Function taskSchedulerFactory has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring.
                      Open

                      function taskSchedulerFactory(
                          eventsProtocol,
                          store,
                          LeaseExpirationPoller,
                          Constants,
                      Severity: Minor
                      Found in lib/task-scheduler.js - About 4 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

                      Function Runner has 120 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      function Runner(configureFile, Logger, uuid, constants,
                                      eventsProtocol, lookupService, Errors, events) {
                          var logger = Logger.initialize('TaskGraph');
                          var server;
                          function start() {
                      Severity: Major
                      Found in app.js - About 4 hrs to fix

                        Function rxMixins has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring.
                        Open

                        function rxMixins(
                            Rx,
                            assert
                        ) {
                        
                        
                        Severity: Minor
                        Found in lib/rx-mixins.js - About 4 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

                        Function schemaApiServiceFactory has 99 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        function schemaApiServiceFactory(
                            configuration,
                            Logger,
                            Promise,
                            _,
                        Severity: Major
                        Found in lib/services/schema-api-service.js - About 3 hrs to fix

                          Function rxMixins has 95 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          function rxMixins(
                              Rx,
                              assert
                          ) {
                          
                          
                          Severity: Major
                          Found in lib/rx-mixins.js - About 3 hrs to fix

                            Function prepareGrunt has 93 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            function prepareGrunt(grunt) {
                                var allFiles = [
                                    'package.json',
                                    'Gruntfile.js',
                                    'lib/**/*.js',
                            Severity: Major
                            Found in Gruntfile.js - About 3 hrs to fix

                              Function getProfileFromTaskOrNode has 86 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  ProfileApiService.prototype.getProfileFromTaskOrNode = function(node, vendor) {
                                      var self = this;
                                      var defaultProfile;
                              
                                      if (node.type === 'switch') {
                              Severity: Major
                              Found in lib/services/profile-api-service.js - About 3 hrs to fix

                                Function schedulerServerFactory has 83 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                function schedulerServerFactory(
                                    assert,
                                    _,
                                    Promise,
                                    Logger
                                Severity: Major
                                Found in api/rpc/index.js - About 3 hrs to fix
                                  Severity
                                  Category
                                  Status
                                  Source
                                  Language