Katello/katello

View on GitHub
webpack/scenes/SmartProxy/AdditionalCapsuleContent.js

Summary

Maintainability
C
7 hrs
Test Coverage

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

  counts: PropTypes.shape({
    deb: PropTypes.number,
    docker_manifest: PropTypes.number,
    docker_manifest_list: PropTypes.number,
    docker_tag: PropTypes.number,
Severity: Major
Found in webpack/scenes/SmartProxy/AdditionalCapsuleContent.js and 1 other location - About 2 hrs to fix
webpack/scenes/Subscriptions/Manifest/CdnConfigurationTab/index.js on lines 91..100

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

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

  const contentConfigTypes = ContentConfig.filter(({ names: { capsuleCountLabel } }) =>
    !!counts[`${capsuleCountLabel}`])
    .map(({
      names: {
        capsuleCountLabel, pluralLowercase,
Severity: Minor
Found in webpack/scenes/SmartProxy/AdditionalCapsuleContent.js and 1 other location - About 35 mins to fix
webpack/scenes/ContentViews/Details/Versions/ContentViewVersionContent.js on lines 21..35

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

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

      {debPackageCount > 0 &&
      <>
        {`${debPackageCount} ${__('Debian packages')}`}<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 65..69

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

      {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

      {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

      {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

      {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

      {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

There are no issues that match your filters.

Category
Status