Katello/katello

View on GitHub

Showing 1,760 of 2,737 total issues

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

      {dockerTagCount > 0 &&
      <>
        {`${dockerTagCount} ${__('Container tags')}`}<br />
      </>
            }
Severity: Major
Found in webpack/scenes/SmartProxy/AdditionalCapsuleContent.js and 7 other locations - About 30 mins to fix
webpack/scenes/SmartProxy/AdditionalCapsuleContent.js on lines 35..39
webpack/scenes/SmartProxy/AdditionalCapsuleContent.js on lines 40..44
webpack/scenes/SmartProxy/AdditionalCapsuleContent.js on lines 45..49
webpack/scenes/SmartProxy/AdditionalCapsuleContent.js on lines 55..59
webpack/scenes/SmartProxy/AdditionalCapsuleContent.js on lines 60..64
webpack/scenes/SmartProxy/AdditionalCapsuleContent.js on lines 65..69
webpack/scenes/SmartProxy/AdditionalCapsuleContent.js on lines 70..73

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

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

      {dockerManifestCount > 0 &&
      <>
        {`${dockerManifestCount} ${__('Container manifests')}`}<br />
      </>
            }
Severity: Major
Found in webpack/scenes/SmartProxy/AdditionalCapsuleContent.js and 7 other locations - About 30 mins to fix
webpack/scenes/SmartProxy/AdditionalCapsuleContent.js on lines 35..39
webpack/scenes/SmartProxy/AdditionalCapsuleContent.js on lines 40..44
webpack/scenes/SmartProxy/AdditionalCapsuleContent.js on lines 45..49
webpack/scenes/SmartProxy/AdditionalCapsuleContent.js on lines 50..54
webpack/scenes/SmartProxy/AdditionalCapsuleContent.js on lines 60..64
webpack/scenes/SmartProxy/AdditionalCapsuleContent.js on lines 65..69
webpack/scenes/SmartProxy/AdditionalCapsuleContent.js on lines 70..73

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

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

      {fileCount > 0 &&
      <>
        {`${fileCount} ${__('Files')}`}<br />
      </>
            }
Severity: Major
Found in webpack/scenes/SmartProxy/AdditionalCapsuleContent.js and 7 other locations - About 30 mins to fix
webpack/scenes/SmartProxy/AdditionalCapsuleContent.js on lines 35..39
webpack/scenes/SmartProxy/AdditionalCapsuleContent.js on lines 40..44
webpack/scenes/SmartProxy/AdditionalCapsuleContent.js on lines 45..49
webpack/scenes/SmartProxy/AdditionalCapsuleContent.js on lines 50..54
webpack/scenes/SmartProxy/AdditionalCapsuleContent.js on lines 55..59
webpack/scenes/SmartProxy/AdditionalCapsuleContent.js on lines 60..64
webpack/scenes/SmartProxy/AdditionalCapsuleContent.js on lines 70..73

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

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

      {moduleStreamCount > 0 &&
      <>
        {`${moduleStreamCount} ${__('Module streams')}`}<br />
      </>
            }
Severity: Major
Found in webpack/scenes/SmartProxy/AdditionalCapsuleContent.js and 7 other locations - About 30 mins to fix
webpack/scenes/SmartProxy/AdditionalCapsuleContent.js on lines 35..39
webpack/scenes/SmartProxy/AdditionalCapsuleContent.js on lines 45..49
webpack/scenes/SmartProxy/AdditionalCapsuleContent.js on lines 50..54
webpack/scenes/SmartProxy/AdditionalCapsuleContent.js on lines 55..59
webpack/scenes/SmartProxy/AdditionalCapsuleContent.js on lines 60..64
webpack/scenes/SmartProxy/AdditionalCapsuleContent.js on lines 65..69
webpack/scenes/SmartProxy/AdditionalCapsuleContent.js on lines 70..73

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

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

      {dockerManifestListCount > 0 &&
      <>
        {`${dockerManifestListCount} ${__('Container manifest lists')}`}<br />
      </>
      }
Severity: Major
Found in webpack/scenes/SmartProxy/AdditionalCapsuleContent.js and 7 other locations - About 30 mins to fix
webpack/scenes/SmartProxy/AdditionalCapsuleContent.js on lines 35..39
webpack/scenes/SmartProxy/AdditionalCapsuleContent.js on lines 40..44
webpack/scenes/SmartProxy/AdditionalCapsuleContent.js on lines 45..49
webpack/scenes/SmartProxy/AdditionalCapsuleContent.js on lines 50..54
webpack/scenes/SmartProxy/AdditionalCapsuleContent.js on lines 55..59
webpack/scenes/SmartProxy/AdditionalCapsuleContent.js on lines 65..69
webpack/scenes/SmartProxy/AdditionalCapsuleContent.js on lines 70..73

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

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

      {errataCount > 0 &&
      <>
        {`${errataCount} ${__('Errata')}`}<br />
      </>
            }
Severity: Major
Found in webpack/scenes/SmartProxy/AdditionalCapsuleContent.js and 7 other locations - About 30 mins to fix
webpack/scenes/SmartProxy/AdditionalCapsuleContent.js on lines 40..44
webpack/scenes/SmartProxy/AdditionalCapsuleContent.js on lines 45..49
webpack/scenes/SmartProxy/AdditionalCapsuleContent.js on lines 50..54
webpack/scenes/SmartProxy/AdditionalCapsuleContent.js on lines 55..59
webpack/scenes/SmartProxy/AdditionalCapsuleContent.js on lines 60..64
webpack/scenes/SmartProxy/AdditionalCapsuleContent.js on lines 65..69
webpack/scenes/SmartProxy/AdditionalCapsuleContent.js on lines 70..73

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

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

      {packageGroup > 0 &&
      <>
        {`${packageGroup} ${__('Package groups')}`}<br />
      </>
            }
Severity: Major
Found in webpack/scenes/SmartProxy/AdditionalCapsuleContent.js and 7 other locations - About 30 mins to fix
webpack/scenes/SmartProxy/AdditionalCapsuleContent.js on lines 35..39
webpack/scenes/SmartProxy/AdditionalCapsuleContent.js on lines 40..44
webpack/scenes/SmartProxy/AdditionalCapsuleContent.js on lines 50..54
webpack/scenes/SmartProxy/AdditionalCapsuleContent.js on lines 55..59
webpack/scenes/SmartProxy/AdditionalCapsuleContent.js on lines 60..64
webpack/scenes/SmartProxy/AdditionalCapsuleContent.js on lines 65..69
webpack/scenes/SmartProxy/AdditionalCapsuleContent.js on lines 70..73

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

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

    $stateProvider.state('environment', {
        abstract: true,
        url: '/lifecycle_environments/:environmentId',
        permission: 'view_lifecycle_environments',
        controller: 'EnvironmentController',
engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/environments.routes.js on lines 40..77
engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/environments.routes.js on lines 40..88
engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/environments.routes.js on lines 40..99
engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/environments.routes.js on lines 40..110
engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/environments.routes.js on lines 40..121
engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/environments.routes.js on lines 40..132
engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/environments.routes.js on lines 40..143

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

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

            $scope.moduleStreamActionFormValues.bulkHostIds = angular.toJson({ included: { ids: [$scope.host.id] }});
engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-debs.controller.js on lines 55..55
engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-errata.controller.js on lines 133..133
engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-packages.controller.js on lines 60..60
engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-traces.controller.js on lines 79..79

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

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

  const { getByText } = renderWithRedux(<PublishContentViewWizard
    details={cvCompositeDetailsData}
    show
    onClose={() => { }}
  />);
webpack/scenes/ContentViews/Publish/__tests__/publishContentView.test.js on lines 29..33
webpack/scenes/ContentViews/Publish/__tests__/publishContentView.test.js on lines 71..75
webpack/scenes/ContentViews/Publish/__tests__/publishContentView.test.js on lines 211..215
webpack/scenes/ContentViews/Publish/__tests__/publishContentView.test.js on lines 249..253

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

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

  const { getByText } = renderWithRedux(<PublishContentViewWizard
    details={cvDetailData}
    show
    onClose={() => { }}
  />);
webpack/scenes/ContentViews/Publish/__tests__/publishContentView.test.js on lines 29..33
webpack/scenes/ContentViews/Publish/__tests__/publishContentView.test.js on lines 71..75
webpack/scenes/ContentViews/Publish/__tests__/publishContentView.test.js on lines 98..102
webpack/scenes/ContentViews/Publish/__tests__/publishContentView.test.js on lines 249..253

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

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

  const { getByText } = renderWithRedux(<PublishContentViewWizard
    details={cvDetailData}
    show
    onClose={() => { }}
  />);
webpack/scenes/ContentViews/Publish/__tests__/publishContentView.test.js on lines 29..33
webpack/scenes/ContentViews/Publish/__tests__/publishContentView.test.js on lines 71..75
webpack/scenes/ContentViews/Publish/__tests__/publishContentView.test.js on lines 98..102
webpack/scenes/ContentViews/Publish/__tests__/publishContentView.test.js on lines 211..215

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

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

            $scope.packageActionFormValues.bulkHostIds = angular.toJson({ included: { ids: [$scope.host.id] }});
engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-errata.controller.js on lines 133..133
engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-module-streams.controller.js on lines 55..55
engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-packages.controller.js on lines 60..60
engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-traces.controller.js on lines 79..79

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

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

            $scope.errataActionFormValues.bulkHostIds = angular.toJson({ included: { ids: [$scope.host.id] }});
engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-debs.controller.js on lines 55..55
engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-module-streams.controller.js on lines 55..55
engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-packages.controller.js on lines 60..60
engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-traces.controller.js on lines 79..79

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

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

  const { getByText } = renderWithRedux(<PublishContentViewWizard
    details={cvCompositeDetailsData}
    show
    onClose={() => { }}
  />);
webpack/scenes/ContentViews/Publish/__tests__/publishContentView.test.js on lines 29..33
webpack/scenes/ContentViews/Publish/__tests__/publishContentView.test.js on lines 98..102
webpack/scenes/ContentViews/Publish/__tests__/publishContentView.test.js on lines 211..215
webpack/scenes/ContentViews/Publish/__tests__/publishContentView.test.js on lines 249..253

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

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

            $scope.packageActionFormValues.bulkHostIds = angular.toJson({ included: { ids: [$scope.host.id] }});
engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-debs.controller.js on lines 55..55
engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-errata.controller.js on lines 133..133
engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-module-streams.controller.js on lines 55..55
engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-traces.controller.js on lines 79..79

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

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

            $scope.traceActionFormValues.bulkHostIds = angular.toJson({ included: { ids: [$scope.host.id] }});
engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-debs.controller.js on lines 55..55
engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-errata.controller.js on lines 133..133
engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-module-streams.controller.js on lines 55..55
engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-packages.controller.js on lines 60..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 45.

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

  const { getByText } = renderWithRedux(<PublishContentViewWizard
    details={cvDetailData}
    show
    onClose={() => { }}
  />);
webpack/scenes/ContentViews/Publish/__tests__/publishContentView.test.js on lines 71..75
webpack/scenes/ContentViews/Publish/__tests__/publishContentView.test.js on lines 98..102
webpack/scenes/ContentViews/Publish/__tests__/publishContentView.test.js on lines 211..215
webpack/scenes/ContentViews/Publish/__tests__/publishContentView.test.js on lines 249..253

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

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

                    <Select
                      variant={SelectVariant.single}
                      onToggle={setSelectOpen}
                      ouiaId="added-notAdded-selector"
                      onSelect={(_event, selection) => {
webpack/scenes/ContentViews/Details/Filters/CVPackageGroupFilterContent.js on lines 236..250

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

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

export const getCVPlaceholderText = ({
  contentSourceId = null,
  environments = [],
  contentViewsStatus = STATUS.PENDING,
  cvSelectOptions = [],
webpack/scenes/ContentViews/components/ContentViewSelect/helpers.js on lines 18..30

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

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