Katello/katello

View on GitHub
webpack/scenes/ContentViews/Details/Versions/VersionDetails/__tests__/ContentViewVersionDetails.test.js

Summary

Maintainability
D
2 days
Test Coverage

File ContentViewVersionDetails.test.js has 275 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import React from 'react';
import { renderWithRedux, patientlyWaitFor } from 'react-testing-lib-wrapper';
import { Route } from 'react-router-dom';
import { head, last } from 'lodash';
import { nockInstance, assertNockRequest, mockAutocomplete } from '../../../../../../test-utils/nockWrapper';

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

      {
        name: 'RPM Package Groups',
        countKey: 'package_group_count',
        autoCompleteUrl: '/package_groups/auto_complete_search',
        dataUrl: api.getApiUrl('/package_groups'),
    webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js on lines 100..109
    webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js on lines 110..119
    webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js on lines 120..129
    webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js on lines 130..139
    webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js on lines 140..149
    webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js on lines 150..159
    webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js on lines 160..169
    webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js on lines 170..179
    webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js on lines 180..189
    webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js on lines 202..211
    webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js on lines 212..221
    webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js on lines 222..231
    webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js on lines 259..268
    webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js on lines 281..290
    webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js on lines 291..300
    webpack/scenes/ContentViews/Details/Versions/VersionDetails/__tests__/ContentViewVersionDetails.test.js on lines 115..124
    webpack/scenes/ContentViews/Details/Versions/VersionDetails/__tests__/ContentViewVersionDetails.test.js on lines 125..134
    webpack/scenes/ContentViews/Details/Versions/VersionDetails/__tests__/ContentViewVersionDetails.test.js on lines 145..154
    webpack/scenes/ContentViews/Details/Versions/VersionDetails/__tests__/ContentViewVersionDetails.test.js on lines 155..164
    webpack/scenes/ContentViews/Details/Versions/VersionDetails/__tests__/ContentViewVersionDetails.test.js on lines 165..174
    webpack/scenes/ContentViews/Details/Versions/VersionDetails/__tests__/ContentViewVersionDetails.test.js on lines 175..184
    webpack/scenes/ContentViews/Details/Versions/VersionDetails/__tests__/ContentViewVersionDetails.test.js on lines 185..195
    webpack/scenes/ContentViews/Details/Versions/VersionDetails/__tests__/ContentViewVersionDetails.test.js on lines 196..205

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

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

      {
        name: 'Files',
        countKey: 'file_count',
        autoCompleteUrl: '/files/auto_complete_search',
        dataUrl: api.getApiUrl('/files'),
    webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js on lines 100..109
    webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js on lines 110..119
    webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js on lines 120..129
    webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js on lines 130..139
    webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js on lines 140..149
    webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js on lines 150..159
    webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js on lines 160..169
    webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js on lines 170..179
    webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js on lines 180..189
    webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js on lines 202..211
    webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js on lines 212..221
    webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js on lines 222..231
    webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js on lines 259..268
    webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js on lines 281..290
    webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js on lines 291..300
    webpack/scenes/ContentViews/Details/Versions/VersionDetails/__tests__/ContentViewVersionDetails.test.js on lines 115..124
    webpack/scenes/ContentViews/Details/Versions/VersionDetails/__tests__/ContentViewVersionDetails.test.js on lines 125..134
    webpack/scenes/ContentViews/Details/Versions/VersionDetails/__tests__/ContentViewVersionDetails.test.js on lines 135..144
    webpack/scenes/ContentViews/Details/Versions/VersionDetails/__tests__/ContentViewVersionDetails.test.js on lines 155..164
    webpack/scenes/ContentViews/Details/Versions/VersionDetails/__tests__/ContentViewVersionDetails.test.js on lines 165..174
    webpack/scenes/ContentViews/Details/Versions/VersionDetails/__tests__/ContentViewVersionDetails.test.js on lines 175..184
    webpack/scenes/ContentViews/Details/Versions/VersionDetails/__tests__/ContentViewVersionDetails.test.js on lines 185..195
    webpack/scenes/ContentViews/Details/Versions/VersionDetails/__tests__/ContentViewVersionDetails.test.js on lines 196..205

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

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

      {
        name: 'Deb Packages',
        countKey: 'deb_count',
        autoCompleteUrl: '/debs/auto_complete_search',
        dataUrl: api.getApiUrl('/debs'),
    webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js on lines 100..109
    webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js on lines 110..119
    webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js on lines 120..129
    webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js on lines 130..139
    webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js on lines 140..149
    webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js on lines 150..159
    webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js on lines 160..169
    webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js on lines 170..179
    webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js on lines 180..189
    webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js on lines 202..211
    webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js on lines 212..221
    webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js on lines 222..231
    webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js on lines 259..268
    webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js on lines 281..290
    webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js on lines 291..300
    webpack/scenes/ContentViews/Details/Versions/VersionDetails/__tests__/ContentViewVersionDetails.test.js on lines 115..124
    webpack/scenes/ContentViews/Details/Versions/VersionDetails/__tests__/ContentViewVersionDetails.test.js on lines 125..134
    webpack/scenes/ContentViews/Details/Versions/VersionDetails/__tests__/ContentViewVersionDetails.test.js on lines 135..144
    webpack/scenes/ContentViews/Details/Versions/VersionDetails/__tests__/ContentViewVersionDetails.test.js on lines 145..154
    webpack/scenes/ContentViews/Details/Versions/VersionDetails/__tests__/ContentViewVersionDetails.test.js on lines 155..164
    webpack/scenes/ContentViews/Details/Versions/VersionDetails/__tests__/ContentViewVersionDetails.test.js on lines 165..174
    webpack/scenes/ContentViews/Details/Versions/VersionDetails/__tests__/ContentViewVersionDetails.test.js on lines 185..195
    webpack/scenes/ContentViews/Details/Versions/VersionDetails/__tests__/ContentViewVersionDetails.test.js on lines 196..205

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

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

      {
        name: 'Module Streams',
        countKey: 'module_stream_count',
        autoCompleteUrl: '/module_streams/auto_complete_search',
        dataUrl: api.getApiUrl('/module_streams'),
    webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js on lines 100..109
    webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js on lines 110..119
    webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js on lines 120..129
    webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js on lines 130..139
    webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js on lines 140..149
    webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js on lines 150..159
    webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js on lines 160..169
    webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js on lines 170..179
    webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js on lines 180..189
    webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js on lines 202..211
    webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js on lines 212..221
    webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js on lines 222..231
    webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js on lines 259..268
    webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js on lines 281..290
    webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js on lines 291..300
    webpack/scenes/ContentViews/Details/Versions/VersionDetails/__tests__/ContentViewVersionDetails.test.js on lines 115..124
    webpack/scenes/ContentViews/Details/Versions/VersionDetails/__tests__/ContentViewVersionDetails.test.js on lines 125..134
    webpack/scenes/ContentViews/Details/Versions/VersionDetails/__tests__/ContentViewVersionDetails.test.js on lines 135..144
    webpack/scenes/ContentViews/Details/Versions/VersionDetails/__tests__/ContentViewVersionDetails.test.js on lines 145..154
    webpack/scenes/ContentViews/Details/Versions/VersionDetails/__tests__/ContentViewVersionDetails.test.js on lines 155..164
    webpack/scenes/ContentViews/Details/Versions/VersionDetails/__tests__/ContentViewVersionDetails.test.js on lines 175..184
    webpack/scenes/ContentViews/Details/Versions/VersionDetails/__tests__/ContentViewVersionDetails.test.js on lines 185..195
    webpack/scenes/ContentViews/Details/Versions/VersionDetails/__tests__/ContentViewVersionDetails.test.js on lines 196..205

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

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

      {
        name: 'Container tags',
        countKey: 'docker_tag_count',
        autoCompleteUrl: '/docker_tags/auto_complete_search',
        dataUrl: api.getApiUrl('/docker_tags'),
    webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js on lines 100..109
    webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js on lines 110..119
    webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js on lines 120..129
    webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js on lines 130..139
    webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js on lines 140..149
    webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js on lines 150..159
    webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js on lines 160..169
    webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js on lines 170..179
    webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js on lines 180..189
    webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js on lines 202..211
    webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js on lines 212..221
    webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js on lines 222..231
    webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js on lines 259..268
    webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js on lines 281..290
    webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js on lines 291..300
    webpack/scenes/ContentViews/Details/Versions/VersionDetails/__tests__/ContentViewVersionDetails.test.js on lines 115..124
    webpack/scenes/ContentViews/Details/Versions/VersionDetails/__tests__/ContentViewVersionDetails.test.js on lines 125..134
    webpack/scenes/ContentViews/Details/Versions/VersionDetails/__tests__/ContentViewVersionDetails.test.js on lines 135..144
    webpack/scenes/ContentViews/Details/Versions/VersionDetails/__tests__/ContentViewVersionDetails.test.js on lines 145..154
    webpack/scenes/ContentViews/Details/Versions/VersionDetails/__tests__/ContentViewVersionDetails.test.js on lines 155..164
    webpack/scenes/ContentViews/Details/Versions/VersionDetails/__tests__/ContentViewVersionDetails.test.js on lines 165..174
    webpack/scenes/ContentViews/Details/Versions/VersionDetails/__tests__/ContentViewVersionDetails.test.js on lines 175..184
    webpack/scenes/ContentViews/Details/Versions/VersionDetails/__tests__/ContentViewVersionDetails.test.js on lines 185..195

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

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

      {
        name: 'Repositories',
        countKey: 'repositories',
        autoCompleteUrl: '/repositories/auto_complete_search',
        dataUrl: api.getApiUrl('/repositories'),
    webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js on lines 100..109
    webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js on lines 110..119
    webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js on lines 120..129
    webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js on lines 130..139
    webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js on lines 140..149
    webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js on lines 150..159
    webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js on lines 160..169
    webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js on lines 170..179
    webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js on lines 180..189
    webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js on lines 202..211
    webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js on lines 212..221
    webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js on lines 222..231
    webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js on lines 259..268
    webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js on lines 281..290
    webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js on lines 291..300
    webpack/scenes/ContentViews/Details/Versions/VersionDetails/__tests__/ContentViewVersionDetails.test.js on lines 125..134
    webpack/scenes/ContentViews/Details/Versions/VersionDetails/__tests__/ContentViewVersionDetails.test.js on lines 135..144
    webpack/scenes/ContentViews/Details/Versions/VersionDetails/__tests__/ContentViewVersionDetails.test.js on lines 145..154
    webpack/scenes/ContentViews/Details/Versions/VersionDetails/__tests__/ContentViewVersionDetails.test.js on lines 155..164
    webpack/scenes/ContentViews/Details/Versions/VersionDetails/__tests__/ContentViewVersionDetails.test.js on lines 165..174
    webpack/scenes/ContentViews/Details/Versions/VersionDetails/__tests__/ContentViewVersionDetails.test.js on lines 175..184
    webpack/scenes/ContentViews/Details/Versions/VersionDetails/__tests__/ContentViewVersionDetails.test.js on lines 185..195
    webpack/scenes/ContentViews/Details/Versions/VersionDetails/__tests__/ContentViewVersionDetails.test.js on lines 196..205

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

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

      {
        name: 'RPM Packages',
        countKey: 'rpm_count',
        autoCompleteUrl: '/packages/auto_complete_search',
        dataUrl: api.getApiUrl('/packages'),
    webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js on lines 100..109
    webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js on lines 110..119
    webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js on lines 120..129
    webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js on lines 130..139
    webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js on lines 140..149
    webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js on lines 150..159
    webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js on lines 160..169
    webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js on lines 170..179
    webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js on lines 180..189
    webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js on lines 202..211
    webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js on lines 212..221
    webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js on lines 222..231
    webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js on lines 259..268
    webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js on lines 281..290
    webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js on lines 291..300
    webpack/scenes/ContentViews/Details/Versions/VersionDetails/__tests__/ContentViewVersionDetails.test.js on lines 115..124
    webpack/scenes/ContentViews/Details/Versions/VersionDetails/__tests__/ContentViewVersionDetails.test.js on lines 135..144
    webpack/scenes/ContentViews/Details/Versions/VersionDetails/__tests__/ContentViewVersionDetails.test.js on lines 145..154
    webpack/scenes/ContentViews/Details/Versions/VersionDetails/__tests__/ContentViewVersionDetails.test.js on lines 155..164
    webpack/scenes/ContentViews/Details/Versions/VersionDetails/__tests__/ContentViewVersionDetails.test.js on lines 165..174
    webpack/scenes/ContentViews/Details/Versions/VersionDetails/__tests__/ContentViewVersionDetails.test.js on lines 175..184
    webpack/scenes/ContentViews/Details/Versions/VersionDetails/__tests__/ContentViewVersionDetails.test.js on lines 185..195
    webpack/scenes/ContentViews/Details/Versions/VersionDetails/__tests__/ContentViewVersionDetails.test.js on lines 196..205

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

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

      {
        name: 'Errata',
        countKey: 'erratum_count',
        autoCompleteUrl: '/errata/auto_complete_search',
        dataUrl: api.getApiUrl('/errata'),
    webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js on lines 100..109
    webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js on lines 110..119
    webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js on lines 120..129
    webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js on lines 130..139
    webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js on lines 140..149
    webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js on lines 150..159
    webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js on lines 160..169
    webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js on lines 170..179
    webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js on lines 180..189
    webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js on lines 202..211
    webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js on lines 212..221
    webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js on lines 222..231
    webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js on lines 259..268
    webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js on lines 281..290
    webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js on lines 291..300
    webpack/scenes/ContentViews/Details/Versions/VersionDetails/__tests__/ContentViewVersionDetails.test.js on lines 115..124
    webpack/scenes/ContentViews/Details/Versions/VersionDetails/__tests__/ContentViewVersionDetails.test.js on lines 125..134
    webpack/scenes/ContentViews/Details/Versions/VersionDetails/__tests__/ContentViewVersionDetails.test.js on lines 135..144
    webpack/scenes/ContentViews/Details/Versions/VersionDetails/__tests__/ContentViewVersionDetails.test.js on lines 145..154
    webpack/scenes/ContentViews/Details/Versions/VersionDetails/__tests__/ContentViewVersionDetails.test.js on lines 165..174
    webpack/scenes/ContentViews/Details/Versions/VersionDetails/__tests__/ContentViewVersionDetails.test.js on lines 175..184
    webpack/scenes/ContentViews/Details/Versions/VersionDetails/__tests__/ContentViewVersionDetails.test.js on lines 185..195
    webpack/scenes/ContentViews/Details/Versions/VersionDetails/__tests__/ContentViewVersionDetails.test.js on lines 196..205

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

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

      {
    
        name: 'Ansible Collections',
        countKey: 'ansible_collection_count',
        autoCompleteUrl: '/ansible_collections/auto_complete_search',
    webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js on lines 100..109
    webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js on lines 110..119
    webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js on lines 120..129
    webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js on lines 130..139
    webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js on lines 140..149
    webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js on lines 150..159
    webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js on lines 160..169
    webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js on lines 170..179
    webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js on lines 180..189
    webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js on lines 202..211
    webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js on lines 212..221
    webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js on lines 222..231
    webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js on lines 259..268
    webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js on lines 281..290
    webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js on lines 291..300
    webpack/scenes/ContentViews/Details/Versions/VersionDetails/__tests__/ContentViewVersionDetails.test.js on lines 115..124
    webpack/scenes/ContentViews/Details/Versions/VersionDetails/__tests__/ContentViewVersionDetails.test.js on lines 125..134
    webpack/scenes/ContentViews/Details/Versions/VersionDetails/__tests__/ContentViewVersionDetails.test.js on lines 135..144
    webpack/scenes/ContentViews/Details/Versions/VersionDetails/__tests__/ContentViewVersionDetails.test.js on lines 145..154
    webpack/scenes/ContentViews/Details/Versions/VersionDetails/__tests__/ContentViewVersionDetails.test.js on lines 155..164
    webpack/scenes/ContentViews/Details/Versions/VersionDetails/__tests__/ContentViewVersionDetails.test.js on lines 165..174
    webpack/scenes/ContentViews/Details/Versions/VersionDetails/__tests__/ContentViewVersionDetails.test.js on lines 175..184
    webpack/scenes/ContentViews/Details/Versions/VersionDetails/__tests__/ContentViewVersionDetails.test.js on lines 196..205

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

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

        const { getByText, queryByText } = renderWithRedux(
          withCVRoute(<ContentViewVersionDetails cvId={3} details={cvDetailData} />),
          renderOptions,
        );
    webpack/scenes/ContentViews/Details/Filters/__tests__/CVContainerImageFilterContent.test.js on lines 56..60
    webpack/scenes/ContentViews/Details/Filters/__tests__/CVContainerImageFilterContent.test.js on lines 99..103
    webpack/scenes/ContentViews/Details/Filters/__tests__/CVRpmFilterContent.test.js on lines 58..62
    webpack/scenes/ContentViews/Details/Filters/__tests__/contentViewFilterDetails.test.js on lines 52..56
    webpack/scenes/ContentViews/Details/Filters/__tests__/contentViewFilters.test.js on lines 45..46
    webpack/scenes/ContentViews/Details/Versions/VersionDetails/__tests__/ContentViewVersionDetails.test.js on lines 89..92
    webpack/scenes/ContentViews/Details/Versions/VersionDetails/__tests__/ContentViewVersionDetailsEmpty.test.js on lines 51..54
    webpack/scenes/ContentViews/Details/Versions/__tests__/contentViewVersions.test.js on lines 65..68
    webpack/scenes/ContentViews/Details/Versions/__tests__/contentViewVersions.test.js on lines 200..205
    webpack/scenes/ContentViews/Details/Versions/__tests__/contentViewVersions.test.js on lines 401..406
    webpack/scenes/ContentViews/Details/Versions/__tests__/contentViewVersions.test.js on lines 441..444

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

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

      const { getByText, queryByText } = renderWithRedux(
        withCVRoute(<ContentViewVersionDetails cvId={3} details={cvDetailData} />),
        renderOptions,
      );
    webpack/scenes/ContentViews/Details/Filters/__tests__/CVContainerImageFilterContent.test.js on lines 56..60
    webpack/scenes/ContentViews/Details/Filters/__tests__/CVContainerImageFilterContent.test.js on lines 99..103
    webpack/scenes/ContentViews/Details/Filters/__tests__/CVRpmFilterContent.test.js on lines 58..62
    webpack/scenes/ContentViews/Details/Filters/__tests__/contentViewFilterDetails.test.js on lines 52..56
    webpack/scenes/ContentViews/Details/Filters/__tests__/contentViewFilters.test.js on lines 45..46
    webpack/scenes/ContentViews/Details/Versions/VersionDetails/__tests__/ContentViewVersionDetails.test.js on lines 235..238
    webpack/scenes/ContentViews/Details/Versions/VersionDetails/__tests__/ContentViewVersionDetailsEmpty.test.js on lines 51..54
    webpack/scenes/ContentViews/Details/Versions/__tests__/contentViewVersions.test.js on lines 65..68
    webpack/scenes/ContentViews/Details/Versions/__tests__/contentViewVersions.test.js on lines 200..205
    webpack/scenes/ContentViews/Details/Versions/__tests__/contentViewVersions.test.js on lines 401..406
    webpack/scenes/ContentViews/Details/Versions/__tests__/contentViewVersions.test.js on lines 441..444

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

    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

      await patientlyWaitFor(() => {
        expect(getByText(`Version ${version}`)).toBeTruthy();
      });
    webpack/scenes/ContentViews/Details/Versions/VersionDetails/__tests__/ContentViewVersionDetails.test.js on lines 244..246

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

        await patientlyWaitFor(() => {
          expect(getByText(`Version ${version}`)).toBeTruthy();
        });
    webpack/scenes/ContentViews/Details/Versions/VersionDetails/__tests__/ContentViewVersionDetails.test.js on lines 301..303

    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