Katello/katello

View on GitHub

Showing 1,760 of 2,737 total issues

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

        $stateProvider.state('files', {
            url: '/files',
            permission: ['view_products', 'view_content_views'],
            views: {
                '@': {
engines/bastion_katello/app/assets/javascripts/bastion_katello/debs/debs.routes.js on lines 14..72

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

        $scope.confirmHostCollectionAction = function (action) {
            $scope.hostCollections.confirm = true;
            $scope.hostCollections.action = action;
        };
engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/content-hosts-bulk-repository-sets-modal.controller.js on lines 45..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 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 2 locations. Consider refactoring.
Open

      when :errata
        p = self.parameters[:errata_ids]
        msg = details[:event_messages][self.overall_status]
        return n_(msg[1], msg[2], p.length) % { errata: p.first, total: p.length - 1 }
Severity: Minor
Found in app/models/katello/task_status.rb and 1 other location - About 35 mins to fix
app/models/katello/task_status.rb on lines 174..177

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

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

      when :package_group
        p = self.parameters[:groups]
        msg = details[:event_messages][self.overall_status]
        return n_(msg[1], msg[2], p.length) % { group: p.first, total: p.length - 1 }
Severity: Minor
Found in app/models/katello/task_status.rb and 1 other location - About 35 mins to fix
app/models/katello/task_status.rb on lines 178..181

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

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

      <DescriptionListGroup>
        <Term>{__('Synopsis')}</Term>
        <Description>{synopsis}</Description>
      </DescriptionListGroup>
webpack/components/extensions/HostDetails/DetailsTabCards/HwPropertiesCard.js on lines 59..62
webpack/components/extensions/HostDetails/DetailsTabCards/HwPropertiesCard.js on lines 63..66
webpack/components/extensions/HostDetails/DetailsTabCards/HwPropertiesCard.js on lines 67..70
webpack/components/extensions/HostDetails/DetailsTabCards/HwPropertiesCard.js on lines 71..74
webpack/components/extensions/HostDetails/DetailsTabCards/HwPropertiesCard.js on lines 75..78
webpack/components/extensions/HostDetails/DetailsTabCards/RegistrationCard.js on lines 82..85
webpack/components/extensions/HostDetails/Tabs/ErrataTab/ErratumExpansionDetail.js on lines 26..29
webpack/components/extensions/HostDetails/Tabs/ErrataTab/ErratumExpansionDetail.js on lines 30..33

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

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

        <DescriptionListGroup>
          <DescriptionListTerm>{__('Model')}</DescriptionListTerm>
          <DescriptionListDescription>{model}</DescriptionListDescription>
        </DescriptionListGroup>
webpack/components/extensions/HostDetails/DetailsTabCards/HwPropertiesCard.js on lines 63..66
webpack/components/extensions/HostDetails/DetailsTabCards/HwPropertiesCard.js on lines 67..70
webpack/components/extensions/HostDetails/DetailsTabCards/HwPropertiesCard.js on lines 71..74
webpack/components/extensions/HostDetails/DetailsTabCards/HwPropertiesCard.js on lines 75..78
webpack/components/extensions/HostDetails/DetailsTabCards/RegistrationCard.js on lines 82..85
webpack/components/extensions/HostDetails/Tabs/ErrataTab/ErratumExpansionDetail.js on lines 22..25
webpack/components/extensions/HostDetails/Tabs/ErrataTab/ErratumExpansionDetail.js on lines 26..29
webpack/components/extensions/HostDetails/Tabs/ErrataTab/ErratumExpansionDetail.js on lines 30..33

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

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

        <DescriptionListGroup>
          <DescriptionListTerm>{__('Sockets')}</DescriptionListTerm>
          <DescriptionListDescription>{cpuSockets}</DescriptionListDescription>
        </DescriptionListGroup>
webpack/components/extensions/HostDetails/DetailsTabCards/HwPropertiesCard.js on lines 59..62
webpack/components/extensions/HostDetails/DetailsTabCards/HwPropertiesCard.js on lines 63..66
webpack/components/extensions/HostDetails/DetailsTabCards/HwPropertiesCard.js on lines 71..74
webpack/components/extensions/HostDetails/DetailsTabCards/HwPropertiesCard.js on lines 75..78
webpack/components/extensions/HostDetails/DetailsTabCards/RegistrationCard.js on lines 82..85
webpack/components/extensions/HostDetails/Tabs/ErrataTab/ErratumExpansionDetail.js on lines 22..25
webpack/components/extensions/HostDetails/Tabs/ErrataTab/ErratumExpansionDetail.js on lines 26..29
webpack/components/extensions/HostDetails/Tabs/ErrataTab/ErratumExpansionDetail.js on lines 30..33

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

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

      <DescriptionListGroup>
        <Term>{__('Summary')}</Term>
        <Description>{summary}</Description>
      </DescriptionListGroup>
webpack/components/extensions/HostDetails/DetailsTabCards/HwPropertiesCard.js on lines 59..62
webpack/components/extensions/HostDetails/DetailsTabCards/HwPropertiesCard.js on lines 63..66
webpack/components/extensions/HostDetails/DetailsTabCards/HwPropertiesCard.js on lines 67..70
webpack/components/extensions/HostDetails/DetailsTabCards/HwPropertiesCard.js on lines 71..74
webpack/components/extensions/HostDetails/DetailsTabCards/HwPropertiesCard.js on lines 75..78
webpack/components/extensions/HostDetails/DetailsTabCards/RegistrationCard.js on lines 82..85
webpack/components/extensions/HostDetails/Tabs/ErrataTab/ErratumExpansionDetail.js on lines 22..25
webpack/components/extensions/HostDetails/Tabs/ErrataTab/ErratumExpansionDetail.js on lines 30..33

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

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

        <DescriptionListGroup>
          <DescriptionListTerm>{__('Cores per socket')}</DescriptionListTerm>
          <DescriptionListDescription>{coreSocket}</DescriptionListDescription>
        </DescriptionListGroup>
webpack/components/extensions/HostDetails/DetailsTabCards/HwPropertiesCard.js on lines 59..62
webpack/components/extensions/HostDetails/DetailsTabCards/HwPropertiesCard.js on lines 63..66
webpack/components/extensions/HostDetails/DetailsTabCards/HwPropertiesCard.js on lines 67..70
webpack/components/extensions/HostDetails/DetailsTabCards/HwPropertiesCard.js on lines 75..78
webpack/components/extensions/HostDetails/DetailsTabCards/RegistrationCard.js on lines 82..85
webpack/components/extensions/HostDetails/Tabs/ErrataTab/ErratumExpansionDetail.js on lines 22..25
webpack/components/extensions/HostDetails/Tabs/ErrataTab/ErratumExpansionDetail.js on lines 26..29
webpack/components/extensions/HostDetails/Tabs/ErrataTab/ErratumExpansionDetail.js on lines 30..33

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

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

jest.mock('../../hostDetailsHelpers', () => ({
  ...jest.requireActual('../../hostDetailsHelpers'),
  userPermissionsFromHostDetails: () => ({
    create_job_invocations: true,
    edit_hosts: true,
webpack/components/extensions/HostDetails/Cards/HostCollectionsCard/__tests__/hostCollectionsCard.test.js on lines 56..62
webpack/components/extensions/HostDetails/Tabs/__tests__/debsInstallModal.test.js on lines 10..16
webpack/components/extensions/HostDetails/Tabs/__tests__/debsTab.test.js on lines 11..17
webpack/components/extensions/HostDetails/Tabs/__tests__/errataTab.test.js on lines 11..17
webpack/components/extensions/HostDetails/Tabs/__tests__/packageInstallModal.test.js on lines 10..16

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

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

jest.mock('../../hostDetailsHelpers', () => ({
  ...jest.requireActual('../../hostDetailsHelpers'),
  userPermissionsFromHostDetails: () => ({
    create_job_invocations: true,
    edit_hosts: true,
webpack/components/extensions/HostDetails/Cards/HostCollectionsCard/__tests__/hostCollectionsCard.test.js on lines 56..62
webpack/components/extensions/HostDetails/Tabs/__tests__/debsInstallModal.test.js on lines 10..16
webpack/components/extensions/HostDetails/Tabs/__tests__/errataTab.test.js on lines 11..17
webpack/components/extensions/HostDetails/Tabs/__tests__/packageInstallModal.test.js on lines 10..16
webpack/components/extensions/HostDetails/Tabs/__tests__/packagesTab.test.js on lines 11..17

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

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

        <DescriptionListGroup>
          <DescriptionListTerm>{__('Content source')}</DescriptionListTerm>
          <DescriptionListDescription>{contentSourceName}</DescriptionListDescription>
        </DescriptionListGroup>
webpack/components/extensions/HostDetails/DetailsTabCards/HwPropertiesCard.js on lines 59..62
webpack/components/extensions/HostDetails/DetailsTabCards/HwPropertiesCard.js on lines 63..66
webpack/components/extensions/HostDetails/DetailsTabCards/HwPropertiesCard.js on lines 67..70
webpack/components/extensions/HostDetails/DetailsTabCards/HwPropertiesCard.js on lines 71..74
webpack/components/extensions/HostDetails/DetailsTabCards/HwPropertiesCard.js on lines 75..78
webpack/components/extensions/HostDetails/Tabs/ErrataTab/ErratumExpansionDetail.js on lines 22..25
webpack/components/extensions/HostDetails/Tabs/ErrataTab/ErratumExpansionDetail.js on lines 26..29
webpack/components/extensions/HostDetails/Tabs/ErrataTab/ErratumExpansionDetail.js on lines 30..33

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

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

        <DescriptionListGroup>
          <DescriptionListTerm>{__('Number of CPU(s)')}</DescriptionListTerm>
          <DescriptionListDescription>{cpuCount}</DescriptionListDescription>
        </DescriptionListGroup>
webpack/components/extensions/HostDetails/DetailsTabCards/HwPropertiesCard.js on lines 59..62
webpack/components/extensions/HostDetails/DetailsTabCards/HwPropertiesCard.js on lines 67..70
webpack/components/extensions/HostDetails/DetailsTabCards/HwPropertiesCard.js on lines 71..74
webpack/components/extensions/HostDetails/DetailsTabCards/HwPropertiesCard.js on lines 75..78
webpack/components/extensions/HostDetails/DetailsTabCards/RegistrationCard.js on lines 82..85
webpack/components/extensions/HostDetails/Tabs/ErrataTab/ErratumExpansionDetail.js on lines 22..25
webpack/components/extensions/HostDetails/Tabs/ErrataTab/ErratumExpansionDetail.js on lines 26..29
webpack/components/extensions/HostDetails/Tabs/ErrataTab/ErratumExpansionDetail.js on lines 30..33

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

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

jest.mock('../../hostDetailsHelpers', () => ({
  ...jest.requireActual('../../hostDetailsHelpers'),
  userPermissionsFromHostDetails: () => ({
    create_job_invocations: true,
    edit_hosts: true,
webpack/components/extensions/HostDetails/Cards/HostCollectionsCard/__tests__/hostCollectionsCard.test.js on lines 56..62
webpack/components/extensions/HostDetails/Tabs/__tests__/debsTab.test.js on lines 11..17
webpack/components/extensions/HostDetails/Tabs/__tests__/errataTab.test.js on lines 11..17
webpack/components/extensions/HostDetails/Tabs/__tests__/packageInstallModal.test.js on lines 10..16
webpack/components/extensions/HostDetails/Tabs/__tests__/packagesTab.test.js on lines 11..17

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

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

        <DescriptionListGroup>
          <DescriptionListTerm>{__('RAM')}</DescriptionListTerm>
          <DescriptionListDescription>{memory}</DescriptionListDescription>
        </DescriptionListGroup>
webpack/components/extensions/HostDetails/DetailsTabCards/HwPropertiesCard.js on lines 59..62
webpack/components/extensions/HostDetails/DetailsTabCards/HwPropertiesCard.js on lines 63..66
webpack/components/extensions/HostDetails/DetailsTabCards/HwPropertiesCard.js on lines 67..70
webpack/components/extensions/HostDetails/DetailsTabCards/HwPropertiesCard.js on lines 71..74
webpack/components/extensions/HostDetails/DetailsTabCards/RegistrationCard.js on lines 82..85
webpack/components/extensions/HostDetails/Tabs/ErrataTab/ErratumExpansionDetail.js on lines 22..25
webpack/components/extensions/HostDetails/Tabs/ErrataTab/ErratumExpansionDetail.js on lines 26..29
webpack/components/extensions/HostDetails/Tabs/ErrataTab/ErratumExpansionDetail.js on lines 30..33

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

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

      <DescriptionListGroup>
        <Term>{__('Solution')}</Term>
        <Description>{solution}</Description>
      </DescriptionListGroup>
webpack/components/extensions/HostDetails/DetailsTabCards/HwPropertiesCard.js on lines 59..62
webpack/components/extensions/HostDetails/DetailsTabCards/HwPropertiesCard.js on lines 63..66
webpack/components/extensions/HostDetails/DetailsTabCards/HwPropertiesCard.js on lines 67..70
webpack/components/extensions/HostDetails/DetailsTabCards/HwPropertiesCard.js on lines 71..74
webpack/components/extensions/HostDetails/DetailsTabCards/HwPropertiesCard.js on lines 75..78
webpack/components/extensions/HostDetails/DetailsTabCards/RegistrationCard.js on lines 82..85
webpack/components/extensions/HostDetails/Tabs/ErrataTab/ErratumExpansionDetail.js on lines 22..25
webpack/components/extensions/HostDetails/Tabs/ErrataTab/ErratumExpansionDetail.js on lines 26..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 46.

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

jest.mock('../../hostDetailsHelpers', () => ({
  ...jest.requireActual('../../hostDetailsHelpers'),
  userPermissionsFromHostDetails: () => ({
    create_job_invocations: true,
    edit_hosts: true,
webpack/components/extensions/HostDetails/Cards/HostCollectionsCard/__tests__/hostCollectionsCard.test.js on lines 56..62
webpack/components/extensions/HostDetails/Tabs/__tests__/debsInstallModal.test.js on lines 10..16
webpack/components/extensions/HostDetails/Tabs/__tests__/debsTab.test.js on lines 11..17
webpack/components/extensions/HostDetails/Tabs/__tests__/errataTab.test.js on lines 11..17
webpack/components/extensions/HostDetails/Tabs/__tests__/packagesTab.test.js on lines 11..17

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

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

jest.mock('../../hostDetailsHelpers', () => ({
  ...jest.requireActual('../../hostDetailsHelpers'),
  userPermissionsFromHostDetails: () => ({
    create_job_invocations: true,
    edit_hosts: true,
webpack/components/extensions/HostDetails/Cards/HostCollectionsCard/__tests__/hostCollectionsCard.test.js on lines 56..62
webpack/components/extensions/HostDetails/Tabs/__tests__/debsInstallModal.test.js on lines 10..16
webpack/components/extensions/HostDetails/Tabs/__tests__/debsTab.test.js on lines 11..17
webpack/components/extensions/HostDetails/Tabs/__tests__/packageInstallModal.test.js on lines 10..16
webpack/components/extensions/HostDetails/Tabs/__tests__/packagesTab.test.js on lines 11..17

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

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 {
    isSelected,
    selectOne,
    selectNone,
    fetchBulkParams,
webpack/components/extensions/HostDetails/Tabs/ErrataTab/ErrataTab.js on lines 219..229
webpack/components/extensions/HostDetails/Tabs/ModuleStreamsTab/ModuleStreamsTab.js on lines 319..327
webpack/components/extensions/HostDetails/Tabs/RepositorySetsTab/RepositorySetsTab.js on lines 298..306
webpack/scenes/ContentViews/Details/Filters/CVErrataIDFilterContent.js on lines 91..101

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

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