RackHD/on-taskgraph

View on GitHub

Showing 247 of 247 total issues

Similar blocks of code found in 2 locations. Consider refactoring.
Open

module.exports = {
    friendlyName: 'SKU Orig Discovery',
    injectableName: 'Graph.SKU.Orig.Discovery',
    options: {
        defaults: {
Severity: Major
Found in lib/graphs/discovery-sku-orig-graph.js and 1 other location - About 3 days to fix
lib/graphs/discovery-sku-graph.js on lines 5..185

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 651.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

module.exports = {
    friendlyName: 'SKU Discovery',
    injectableName: 'Graph.SKU.Discovery',
    options: {
        defaults: {
Severity: Major
Found in lib/graphs/discovery-sku-graph.js and 1 other location - About 3 days to fix
lib/graphs/discovery-sku-orig-graph.js on lines 5..185

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 651.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

              Similar blocks of code found in 2 locations. Consider refactoring.
              Open

              module.exports = {
                  friendlyName: 'Bootstrap And Set Credentials',
                  injectableName: 'Graph.Bootstrap.With.BMC.Credentials.Setup',
                  options: {
                      defaults: {
              Severity: Major
              Found in lib/graphs/bootstrap-bmc-credentials-setup-graph.js and 1 other location - About 1 day to fix
              lib/graphs/bootstrap-bmc-credentials-remove-graph.js on lines 5..60

              Duplicated Code

              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

              Tuning

              This issue has a mass of 204.

              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

              Refactorings

              Further Reading

              Similar blocks of code found in 2 locations. Consider refactoring.
              Open

              module.exports = {
                  friendlyName: 'Bootstrap And Remove BMC Credentials',
                  injectableName: 'Graph.Bootstrap.With.BMC.Credentials.Remove',
                  options: {
                      defaults: {
              Severity: Major
              Found in lib/graphs/bootstrap-bmc-credentials-remove-graph.js and 1 other location - About 1 day to fix
              lib/graphs/bootstrap-bmc-credentials-setup-graph.js on lines 5..60

              Duplicated Code

              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

              Tuning

              This issue has a mass of 204.

              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

              Refactorings

              Further Reading

              Identical blocks of code found in 2 locations. Consider refactoring.
              Open

                      {
                          label: 'create-default-pollers',
                          taskDefinition: {
                              friendlyName: 'Create Default Pollers',
                              injectableName: 'Task.Inline.Pollers.CreateDefault',
              Severity: Major
              Found in lib/graphs/discovery-refresh-immediate-graph.js and 1 other location - About 1 day to fix
              lib/graphs/discovery-refresh-delayed-graph.js on lines 58..116

              Duplicated Code

              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

              Tuning

              This issue has a mass of 200.

              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

              Refactorings

              Further Reading

              Identical blocks of code found in 2 locations. Consider refactoring.
              Open

                      {
                          label: 'create-default-pollers',
                          taskDefinition: {
                              friendlyName: 'Create Default Pollers',
                              injectableName: 'Task.Inline.Pollers.CreateDefault',
              Severity: Major
              Found in lib/graphs/discovery-refresh-delayed-graph.js and 1 other location - About 1 day to fix
              lib/graphs/discovery-refresh-immediate-graph.js on lines 68..126

              Duplicated Code

              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

              Tuning

              This issue has a mass of 200.

              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

              Refactorings

              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

                Similar blocks of code found in 2 locations. Consider refactoring.
                Open

                module.exports = {
                    friendlyName: 'Delete RAID via Storcli',
                    injectableName: 'Graph.Raid.Delete.MegaRAID',
                    options: {
                        "bootstrap-rancher": {
                Severity: Major
                Found in lib/graphs/delete-megaraid-graph.js and 1 other location - About 7 hrs to fix
                lib/graphs/create-megaraid-graph.js on lines 5..55

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 177.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 2 locations. Consider refactoring.
                Open

                module.exports = {
                    friendlyName: 'Create RAID via Storcli',
                    injectableName: 'Graph.Raid.Create.MegaRAID',
                    options: {
                        "bootstrap-rancher": {
                Severity: Major
                Found in lib/graphs/create-megaraid-graph.js and 1 other location - About 7 hrs to fix
                lib/graphs/delete-megaraid-graph.js on lines 5..55

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 177.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 2 locations. Consider refactoring.
                Open

                module.exports = {
                    friendlyName: 'Dell Racadm Disable VTx Graph',
                    injectableName: 'Graph.Dell.Disable.VTx',
                    options: {
                        'dell-racadm-disable-VTx': {
                Severity: Major
                Found in lib/graphs/dell-racadm-disable-vtx-graph.js and 1 other location - About 6 hrs to fix
                lib/graphs/dell-racadm-enable-vtx-graph.js on lines 5..48

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 162.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 2 locations. Consider refactoring.
                Open

                module.exports = {
                    friendlyName: 'Dell Racadm Enable VTx Graph',
                    injectableName: 'Graph.Dell.Enable.VTx',
                    options: {
                        'dell-racadm-enable-VTx': {
                Severity: Major
                Found in lib/graphs/dell-racadm-enable-vtx-graph.js and 1 other location - About 6 hrs to fix
                lib/graphs/dell-racadm-disable-vtx-graph.js on lines 5..48

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 162.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 2 locations. Consider refactoring.
                Open

                module.exports = {
                    "friendlyName": "Dell perccli Catalog",
                    "injectableName": "Graph.Dell.perccli.Catalog",
                    "options": {
                        "bootstrap-rancher": {
                Severity: Major
                Found in lib/graphs/dell-perccli-megaraid-catalog-graph.js and 1 other location - About 6 hrs to fix
                lib/graphs/quanta-storcli-megaraid-catalog-graph.js on lines 5..49

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 159.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Severity
                Category
                Status
                Source
                Language