RackHD/on-taskgraph

View on GitHub

Showing 247 of 247 total issues

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

module.exports = {
    "friendlyName": "Dell Switch Bmp Discovery",
    "injectableName": "Graph.Switch.Discovery.Dell.Bmp",
    "tasks": [
        {
Severity: Major
Found in lib/graphs/dell-switch-discovery-graph.js and 4 other locations - About 3 hrs to fix
lib/graphs/arista-switch-discovery-graph.js on lines 5..27
lib/graphs/brocade-switch-discovery-graph.js on lines 6..28
lib/graphs/cisco-switch-discovery-graph.js on lines 5..27
lib/graphs/dell-onie-switch-discovery-graph.js on lines 5..27

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 97.

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 5 locations. Consider refactoring.
Open

module.exports = {
    "friendlyName": "Brocade Switch Discovery",
    "injectableName": "Graph.Switch.Discovery.Brocade.Ztp",
    "tasks": [
        {
Severity: Major
Found in lib/graphs/brocade-switch-discovery-graph.js and 4 other locations - About 3 hrs to fix
lib/graphs/arista-switch-discovery-graph.js on lines 5..27
lib/graphs/cisco-switch-discovery-graph.js on lines 5..27
lib/graphs/dell-onie-switch-discovery-graph.js on lines 5..27
lib/graphs/dell-switch-discovery-graph.js on lines 5..27

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 97.

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 5 locations. Consider refactoring.
Open

module.exports = {
    "friendlyName": "Cisco Switch POAP Discovery",
    "injectableName": "Graph.Switch.Discovery.Cisco.Poap",
    "tasks": [
        {
Severity: Major
Found in lib/graphs/cisco-switch-discovery-graph.js and 4 other locations - About 3 hrs to fix
lib/graphs/arista-switch-discovery-graph.js on lines 5..27
lib/graphs/brocade-switch-discovery-graph.js on lines 6..28
lib/graphs/dell-onie-switch-discovery-graph.js on lines 5..27
lib/graphs/dell-switch-discovery-graph.js on lines 5..27

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 97.

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 5 locations. Consider refactoring.
Open

module.exports = {
    "friendlyName": "Arista Switch ZTP Discovery",
    "injectableName": "Graph.Switch.Discovery.Arista.Ztp",
    "tasks": [
        {
Severity: Major
Found in lib/graphs/arista-switch-discovery-graph.js and 4 other locations - About 3 hrs to fix
lib/graphs/brocade-switch-discovery-graph.js on lines 6..28
lib/graphs/cisco-switch-discovery-graph.js on lines 5..27
lib/graphs/dell-onie-switch-discovery-graph.js on lines 5..27
lib/graphs/dell-switch-discovery-graph.js on lines 5..27

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 97.

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 ServiceGraph has 77 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function ServiceGraph(TaskGraph, store, taskGraphProtocol, Constants, Promise, _) {
    var exports = {
        // Set cancelTaskGraph default timeout
        timeout: 5000
    };
Severity: Major
Found in lib/service-graph.js - About 3 hrs to fix

    Function MergeLossyObserver has 75 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        var MergeLossyObserver = (function () {
            function MergeLossyObserver(o, concurrentCounter, g) {
                this.o = o;
                this.g = g;
                this.done = false;
    Severity: Major
    Found in lib/rx-mixins.js - About 3 hrs to fix

      Function parse_snmp_show has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring.
      Open

      def parse_snmp_show(snmpString):
          i = 0
          nestedArray = 0
          parsedString = ""
      
      
      Severity: Minor
      Found in data/templates/arista-catalog-snmp-settings.py - About 2 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 5 locations. Consider refactoring.
      Open

          tasks: [
              {
                  label: 'set-boot-pxe',
                  taskName: 'Task.Obm.Node.PxeBoot',
                  ignoreFailure: true
      Severity: Major
      Found in lib/graphs/install-debian-graph.js and 4 other locations - About 2 hrs to fix
      lib/graphs/install-centos-graph.js on lines 17..44
      lib/graphs/install-photon-graph.js on lines 21..48
      lib/graphs/install-suse-graph.js on lines 14..40
      lib/graphs/install-windows-server2012-graph.js on lines 14..42

      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 92.

      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 5 locations. Consider refactoring.
      Open

          tasks: [
              {
                  label: 'set-boot-pxe',
                  taskName: 'Task.Obm.Node.PxeBoot',
                  ignoreFailure: true
      Severity: Major
      Found in lib/graphs/install-centos-graph.js and 4 other locations - About 2 hrs to fix
      lib/graphs/install-debian-graph.js on lines 10..37
      lib/graphs/install-photon-graph.js on lines 21..48
      lib/graphs/install-suse-graph.js on lines 14..40
      lib/graphs/install-windows-server2012-graph.js on lines 14..42

      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 92.

      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 3 locations. Consider refactoring.
      Open

          tasks: [
              {
                  label: 'dell-wsman-add-hotspare-getXml',
                  taskName: 'Task.Dell.Wsman.Add.Hotspare.GetXml'
              },
      Severity: Major
      Found in lib/graphs/dell-wsman-add-hotspare-graph.js and 2 other locations - About 2 hrs to fix
      lib/graphs/dell-wsman-add-volume-graph.js on lines 24..51
      lib/graphs/dell-wsman-delete-volume-graph.js on lines 21..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 92.

      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 3 locations. Consider refactoring.
      Open

          tasks: [
              {
                  label: 'dell-wsman-add-volume-getXml',
                  taskName: 'Task.Dell.Wsman.Add.Volume.getXml'
              },
      Severity: Major
      Found in lib/graphs/dell-wsman-add-volume-graph.js and 2 other locations - About 2 hrs to fix
      lib/graphs/dell-wsman-add-hotspare-graph.js on lines 17..44
      lib/graphs/dell-wsman-delete-volume-graph.js on lines 21..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 92.

      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 5 locations. Consider refactoring.
      Open

          tasks: [
              {
                  label: 'set-boot-pxe',
                  taskName: 'Task.Obm.Node.PxeBoot',
                  ignoreFailure: true
      Severity: Major
      Found in lib/graphs/install-suse-graph.js and 4 other locations - About 2 hrs to fix
      lib/graphs/install-centos-graph.js on lines 17..44
      lib/graphs/install-debian-graph.js on lines 10..37
      lib/graphs/install-photon-graph.js on lines 21..48
      lib/graphs/install-windows-server2012-graph.js on lines 14..42

      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 92.

      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 5 locations. Consider refactoring.
      Open

          tasks: [
              {
                  label: 'set-boot-pxe',
                  taskName: 'Task.Obm.Node.PxeBoot',
                  ignoreFailure: true
      Severity: Major
      Found in lib/graphs/install-windows-server2012-graph.js and 4 other locations - About 2 hrs to fix
      lib/graphs/install-centos-graph.js on lines 17..44
      lib/graphs/install-debian-graph.js on lines 10..37
      lib/graphs/install-photon-graph.js on lines 21..48
      lib/graphs/install-suse-graph.js on lines 14..40

      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 92.

      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 5 locations. Consider refactoring.
      Open

          tasks: [
              {
                  label: 'set-boot-pxe',
                  taskName: 'Task.Obm.Node.PxeBoot',
                  ignoreFailure: true
      Severity: Major
      Found in lib/graphs/install-photon-graph.js and 4 other locations - About 2 hrs to fix
      lib/graphs/install-centos-graph.js on lines 17..44
      lib/graphs/install-debian-graph.js on lines 10..37
      lib/graphs/install-suse-graph.js on lines 14..40
      lib/graphs/install-windows-server2012-graph.js on lines 14..42

      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 92.

      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 3 locations. Consider refactoring.
      Open

          tasks: [
              {
                  label: 'dell-wsman-delete-volume-getXml',
                  taskName: 'Task.Dell.Wsman.Delete.Volume.GetXml'
              },
      Severity: Major
      Found in lib/graphs/dell-wsman-delete-volume-graph.js and 2 other locations - About 2 hrs to fix
      lib/graphs/dell-wsman-add-hotspare-graph.js on lines 17..44
      lib/graphs/dell-wsman-add-volume-graph.js on lines 24..51

      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 92.

      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 4 locations. Consider refactoring.
      Open

      module.exports = {
          friendlyName: 'Install CoreOS',
          injectableName: 'Graph.InstallCoreOS',
          tasks: [
              {
      Severity: Major
      Found in lib/graphs/install-coreos-graph.js and 3 other locations - About 2 hrs to fix
      lib/graphs/bootstrap-rancher-graph.js on lines 5..29
      lib/graphs/bootstrap-ubuntu-graph.js on lines 5..29
      lib/graphs/winpe-graph.js on lines 5..29

      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 91.

      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 4 locations. Consider refactoring.
      Open

      module.exports = {
          friendlyName: 'Bootstrap WinPE',
          injectableName: 'Graph.BootstrapWinPE',
          tasks: [
              {
      Severity: Major
      Found in lib/graphs/winpe-graph.js and 3 other locations - About 2 hrs to fix
      lib/graphs/bootstrap-rancher-graph.js on lines 5..29
      lib/graphs/bootstrap-ubuntu-graph.js on lines 5..29
      lib/graphs/install-coreos-graph.js on lines 5..29

      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 91.

      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 createAndRunGraph has 70 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          WorkflowApiService.prototype.createAndRunGraph = function(configuration, nodeId) {
              var self = this;
              return Promise.try(function() {
                  if (!configuration.name || !_.isString(configuration.name)) {
                      throw new Errors.BadRequestError('Graph name is missing or in wrong format');
      Severity: Major
      Found in lib/services/workflow-api-service.js - About 2 hrs to fix

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

        module.exports = {
            friendlyName: 'DEBUG Bootstrap Ubuntu',
            injectableName: 'Graph.BootstrapUbuntu',
            tasks: [
                {
        Severity: Major
        Found in lib/graphs/bootstrap-ubuntu-graph.js and 3 other locations - About 2 hrs to fix
        lib/graphs/bootstrap-rancher-graph.js on lines 5..29
        lib/graphs/install-coreos-graph.js on lines 5..29
        lib/graphs/winpe-graph.js on lines 5..29

        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 91.

        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 4 locations. Consider refactoring.
        Open

        module.exports = {
            friendlyName: 'DEBUG Bootstrap Rancher',
            injectableName: 'Graph.BootstrapRancher',
            tasks: [
                {
        Severity: Major
        Found in lib/graphs/bootstrap-rancher-graph.js and 3 other locations - About 2 hrs to fix
        lib/graphs/bootstrap-ubuntu-graph.js on lines 5..29
        lib/graphs/install-coreos-graph.js on lines 5..29
        lib/graphs/winpe-graph.js on lines 5..29

        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 91.

        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