Katello/katello

View on GitHub

Showing 1,760 of 2,737 total issues

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

          def total_units
            total_unit = 0
            progress_reports = sync_task.try(:[], 'progress_reports') || []
            progress_reports.each do |pr|
              total = pr.try(:[], 'total')
app/lib/actions/pulp3/repository/presenters/repair_presenter.rb on lines 62..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 38.

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

  const {
    pfSortParams, apiSortParams,
    activeSortColumn, activeSortDirection,
  } = useTableSort({
    allColumns: columnHeaders,
webpack/components/extensions/HostDetails/Tabs/DebsTab/DebsTab.js on lines 175..182
webpack/components/extensions/HostDetails/Tabs/ErrataTab/ErrataTab.js on lines 171..178
webpack/components/extensions/HostDetails/Tabs/ModuleStreamsTab/ModuleStreamsTab.js on lines 256..263
webpack/components/extensions/HostDetails/Tabs/PackagesTab/PackagesTab.js on lines 182..189
webpack/scenes/AlternateContentSources/MainTable/ACSTable.js on lines 247..254
webpack/scenes/ContentViews/Table/ContentViewsTable.js on lines 61..68

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

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

  it('should flatten response SAVE_UPSTREAM_SUBSCRIPTIONS_SUCCESS', () => {
    expect(reducer(initialSaveState, {
      type: types.SAVE_UPSTREAM_SUBSCRIPTIONS_SUCCESS,
      response: taskSuccessResponse,
    })).toEqual(saveSuccessState);
webpack/redux/reducers/RedHatRepositories/__tests__/enabled.test.js on lines 33..38
webpack/redux/reducers/RedHatRepositories/__tests__/repositorySetRepositories.test.js on lines 23..28
webpack/scenes/Organizations/__tests__/OrganizationReducer.test.js on lines 23..28
webpack/scenes/Subscriptions/Details/__tests__/SubscriptionDetailReducer.test.js on lines 22..27
webpack/scenes/Subscriptions/Manifest/__tests__/ManifestHistoryReducer.test.js on lines 23..28
webpack/scenes/Subscriptions/UpstreamSubscriptions/__tests__/UpstreamSubscriptionsReducer.test.js on lines 30..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 48.

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

  it('load subscription details on SUBSCRIPTION_DETAILS_SUCCESS', () => {
    expect(reducer(initialState, {
      type: types.SUBSCRIPTION_DETAILS_SUCCESS,
      response: subDetails,
    })).toEqual(successState);
webpack/redux/reducers/RedHatRepositories/__tests__/enabled.test.js on lines 33..38
webpack/redux/reducers/RedHatRepositories/__tests__/repositorySetRepositories.test.js on lines 23..28
webpack/scenes/Organizations/__tests__/OrganizationReducer.test.js on lines 23..28
webpack/scenes/Subscriptions/Manifest/__tests__/ManifestHistoryReducer.test.js on lines 23..28
webpack/scenes/Subscriptions/UpstreamSubscriptions/__tests__/UpstreamSubscriptionsReducer.test.js on lines 30..35
webpack/scenes/Subscriptions/UpstreamSubscriptions/__tests__/UpstreamSubscriptionsReducer.test.js on lines 46..51

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 48.

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

  const {
    pfSortParams, apiSortParams,
    activeSortColumn, activeSortDirection,
  } = useTableSort({
    allColumns: columnHeaders,
Severity: Major
Found in webpack/scenes/AlternateContentSources/MainTable/ACSTable.js and 6 other locations - About 40 mins to fix
webpack/components/extensions/HostDetails/Tabs/DebsTab/DebsTab.js on lines 175..182
webpack/components/extensions/HostDetails/Tabs/ErrataTab/ErrataTab.js on lines 171..178
webpack/components/extensions/HostDetails/Tabs/ModuleStreamsTab/ModuleStreamsTab.js on lines 256..263
webpack/components/extensions/HostDetails/Tabs/PackagesTab/PackagesTab.js on lines 182..189
webpack/components/extensions/HostDetails/Tabs/TracesTab/TracesTab.js on lines 66..73
webpack/scenes/ContentViews/Table/ContentViewsTable.js on lines 61..68

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

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

    {
      substitutions: {
        releasever: '7.4',
        basearch: 'x86_64',
      },
webpack/redux/reducers/RedHatRepositories/repositorySetRepositories.fixtures.js on lines 31..43
webpack/redux/reducers/RedHatRepositories/repositorySetRepositories.fixtures.js on lines 44..56
webpack/redux/reducers/RedHatRepositories/repositorySetRepositories.fixtures.js on lines 57..69
webpack/redux/reducers/RedHatRepositories/repositorySetRepositories.fixtures.js on lines 70..82
webpack/redux/reducers/RedHatRepositories/repositorySetRepositories.fixtures.js on lines 96..108

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

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

    {
      substitutions: {
        releasever: '7.1',
        basearch: 'x86_64',
      },
webpack/redux/reducers/RedHatRepositories/repositorySetRepositories.fixtures.js on lines 31..43
webpack/redux/reducers/RedHatRepositories/repositorySetRepositories.fixtures.js on lines 57..69
webpack/redux/reducers/RedHatRepositories/repositorySetRepositories.fixtures.js on lines 70..82
webpack/redux/reducers/RedHatRepositories/repositorySetRepositories.fixtures.js on lines 83..95
webpack/redux/reducers/RedHatRepositories/repositorySetRepositories.fixtures.js on lines 96..108

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

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

  const {
    pfSortParams, apiSortParams,
    activeSortColumn, activeSortDirection,
  } = useTableSort({
    allColumns: columnHeaders,
webpack/components/extensions/HostDetails/Tabs/DebsTab/DebsTab.js on lines 175..182
webpack/components/extensions/HostDetails/Tabs/ModuleStreamsTab/ModuleStreamsTab.js on lines 256..263
webpack/components/extensions/HostDetails/Tabs/PackagesTab/PackagesTab.js on lines 182..189
webpack/components/extensions/HostDetails/Tabs/TracesTab/TracesTab.js on lines 66..73
webpack/scenes/AlternateContentSources/MainTable/ACSTable.js on lines 247..254
webpack/scenes/ContentViews/Table/ContentViewsTable.js on lines 61..68

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

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

  const {
    pfSortParams, apiSortParams,
    activeSortColumn, activeSortDirection,
  } = useTableSort({
    allColumns: columnHeaders,
webpack/components/extensions/HostDetails/Tabs/DebsTab/DebsTab.js on lines 175..182
webpack/components/extensions/HostDetails/Tabs/ErrataTab/ErrataTab.js on lines 171..178
webpack/components/extensions/HostDetails/Tabs/ModuleStreamsTab/ModuleStreamsTab.js on lines 256..263
webpack/components/extensions/HostDetails/Tabs/TracesTab/TracesTab.js on lines 66..73
webpack/scenes/AlternateContentSources/MainTable/ACSTable.js on lines 247..254
webpack/scenes/ContentViews/Table/ContentViewsTable.js on lines 61..68

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

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

  it('should flatten repositories response ENABLED_REPOSITORIES_SUCCESS', () => {
    expect(reducer(initialState, {
      type: types.ENABLED_REPOSITORIES_SUCCESS,
      response: requestSuccessResponse,
    })).toEqual(successState);
webpack/redux/reducers/RedHatRepositories/__tests__/repositorySetRepositories.test.js on lines 23..28
webpack/scenes/Organizations/__tests__/OrganizationReducer.test.js on lines 23..28
webpack/scenes/Subscriptions/Details/__tests__/SubscriptionDetailReducer.test.js on lines 22..27
webpack/scenes/Subscriptions/Manifest/__tests__/ManifestHistoryReducer.test.js on lines 23..28
webpack/scenes/Subscriptions/UpstreamSubscriptions/__tests__/UpstreamSubscriptionsReducer.test.js on lines 30..35
webpack/scenes/Subscriptions/UpstreamSubscriptions/__tests__/UpstreamSubscriptionsReducer.test.js on lines 46..51

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 48.

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

  it('should set loading state on REPOSITORY_SET_REPOSITORIES_REQUEST', () => {
    expect(reducer(initialState, {
      type: types.REPOSITORY_SET_REPOSITORIES_REQUEST,
      contentId,
    })).toEqual(loadingState);
webpack/redux/reducers/RedHatRepositories/__tests__/enabled.test.js on lines 33..38
webpack/scenes/Organizations/__tests__/OrganizationReducer.test.js on lines 23..28
webpack/scenes/Subscriptions/Details/__tests__/SubscriptionDetailReducer.test.js on lines 22..27
webpack/scenes/Subscriptions/Manifest/__tests__/ManifestHistoryReducer.test.js on lines 23..28
webpack/scenes/Subscriptions/UpstreamSubscriptions/__tests__/UpstreamSubscriptionsReducer.test.js on lines 30..35
webpack/scenes/Subscriptions/UpstreamSubscriptions/__tests__/UpstreamSubscriptionsReducer.test.js on lines 46..51

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 48.

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

    {
      substitutions: {
        releasever: '7.0',
        basearch: 'x86_64',
      },
webpack/redux/reducers/RedHatRepositories/repositorySetRepositories.fixtures.js on lines 44..56
webpack/redux/reducers/RedHatRepositories/repositorySetRepositories.fixtures.js on lines 57..69
webpack/redux/reducers/RedHatRepositories/repositorySetRepositories.fixtures.js on lines 70..82
webpack/redux/reducers/RedHatRepositories/repositorySetRepositories.fixtures.js on lines 83..95
webpack/redux/reducers/RedHatRepositories/repositorySetRepositories.fixtures.js on lines 96..108

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

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

  const {
    pfSortParams, apiSortParams,
    activeSortColumn, activeSortDirection,
  } = useTableSort({
    allColumns: columnHeaders,
webpack/components/extensions/HostDetails/Tabs/ErrataTab/ErrataTab.js on lines 171..178
webpack/components/extensions/HostDetails/Tabs/ModuleStreamsTab/ModuleStreamsTab.js on lines 256..263
webpack/components/extensions/HostDetails/Tabs/PackagesTab/PackagesTab.js on lines 182..189
webpack/components/extensions/HostDetails/Tabs/TracesTab/TracesTab.js on lines 66..73
webpack/scenes/AlternateContentSources/MainTable/ACSTable.js on lines 247..254
webpack/scenes/ContentViews/Table/ContentViewsTable.js on lines 61..68

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

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

  it('should flatten response MANIFEST_HISTORY_SUCCESS', () => {
    expect(reducer(manifestHistoryInitialState, {
      type: types.MANIFEST_HISTORY_SUCCESS,
      response: manifestHistorySuccessResponse,
    })).toEqual(manifestHistorySuccessState);
webpack/redux/reducers/RedHatRepositories/__tests__/enabled.test.js on lines 33..38
webpack/redux/reducers/RedHatRepositories/__tests__/repositorySetRepositories.test.js on lines 23..28
webpack/scenes/Organizations/__tests__/OrganizationReducer.test.js on lines 23..28
webpack/scenes/Subscriptions/Details/__tests__/SubscriptionDetailReducer.test.js on lines 22..27
webpack/scenes/Subscriptions/UpstreamSubscriptions/__tests__/UpstreamSubscriptionsReducer.test.js on lines 30..35
webpack/scenes/Subscriptions/UpstreamSubscriptions/__tests__/UpstreamSubscriptionsReducer.test.js on lines 46..51

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 48.

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

    {
      substitutions: {
        releasever: '7.2',
        basearch: 'x86_64',
      },
webpack/redux/reducers/RedHatRepositories/repositorySetRepositories.fixtures.js on lines 31..43
webpack/redux/reducers/RedHatRepositories/repositorySetRepositories.fixtures.js on lines 44..56
webpack/redux/reducers/RedHatRepositories/repositorySetRepositories.fixtures.js on lines 70..82
webpack/redux/reducers/RedHatRepositories/repositorySetRepositories.fixtures.js on lines 83..95
webpack/redux/reducers/RedHatRepositories/repositorySetRepositories.fixtures.js on lines 96..108

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

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

  const {
    pfSortParams, apiSortParams,
    activeSortColumn, activeSortDirection,
  } = useTableSort({
    allColumns: columnHeaders,
webpack/components/extensions/HostDetails/Tabs/DebsTab/DebsTab.js on lines 175..182
webpack/components/extensions/HostDetails/Tabs/ErrataTab/ErrataTab.js on lines 171..178
webpack/components/extensions/HostDetails/Tabs/PackagesTab/PackagesTab.js on lines 182..189
webpack/components/extensions/HostDetails/Tabs/TracesTab/TracesTab.js on lines 66..73
webpack/scenes/AlternateContentSources/MainTable/ACSTable.js on lines 247..254
webpack/scenes/ContentViews/Table/ContentViewsTable.js on lines 61..68

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

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

  it('should flatten organization response GET_ORGANIZATION_SUCCESS', () => {
    expect(reducer(initialState, {
      type: types.GET_ORGANIZATION_SUCCESS,
      response: requestSuccessResponse,
    })).toEqual(successState);
webpack/redux/reducers/RedHatRepositories/__tests__/enabled.test.js on lines 33..38
webpack/redux/reducers/RedHatRepositories/__tests__/repositorySetRepositories.test.js on lines 23..28
webpack/scenes/Subscriptions/Details/__tests__/SubscriptionDetailReducer.test.js on lines 22..27
webpack/scenes/Subscriptions/Manifest/__tests__/ManifestHistoryReducer.test.js on lines 23..28
webpack/scenes/Subscriptions/UpstreamSubscriptions/__tests__/UpstreamSubscriptionsReducer.test.js on lines 30..35
webpack/scenes/Subscriptions/UpstreamSubscriptions/__tests__/UpstreamSubscriptionsReducer.test.js on lines 46..51

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 48.

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

    {
      substitutions: {
        releasever: '7.3',
        basearch: 'x86_64',
      },
webpack/redux/reducers/RedHatRepositories/repositorySetRepositories.fixtures.js on lines 31..43
webpack/redux/reducers/RedHatRepositories/repositorySetRepositories.fixtures.js on lines 44..56
webpack/redux/reducers/RedHatRepositories/repositorySetRepositories.fixtures.js on lines 57..69
webpack/redux/reducers/RedHatRepositories/repositorySetRepositories.fixtures.js on lines 83..95
webpack/redux/reducers/RedHatRepositories/repositorySetRepositories.fixtures.js on lines 96..108

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

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

  const {
    pfSortParams, apiSortParams,
    activeSortColumn, activeSortDirection,
  } = useTableSort({
    allColumns: columnHeaders,
Severity: Major
Found in webpack/scenes/ContentViews/Table/ContentViewsTable.js and 6 other locations - About 40 mins to fix
webpack/components/extensions/HostDetails/Tabs/DebsTab/DebsTab.js on lines 175..182
webpack/components/extensions/HostDetails/Tabs/ErrataTab/ErrataTab.js on lines 171..178
webpack/components/extensions/HostDetails/Tabs/ModuleStreamsTab/ModuleStreamsTab.js on lines 256..263
webpack/components/extensions/HostDetails/Tabs/PackagesTab/PackagesTab.js on lines 182..189
webpack/components/extensions/HostDetails/Tabs/TracesTab/TracesTab.js on lines 66..73
webpack/scenes/AlternateContentSources/MainTable/ACSTable.js on lines 247..254

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

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

  it('should flatten subscriptions response UPSTREAM_SUBSCRIPTIONS_SUCCESS', () => {
    expect(reducer(initialState, {
      type: types.UPSTREAM_SUBSCRIPTIONS_SUCCESS,
      response: requestSuccessResponse,
    })).toEqual(successState);
webpack/redux/reducers/RedHatRepositories/__tests__/enabled.test.js on lines 33..38
webpack/redux/reducers/RedHatRepositories/__tests__/repositorySetRepositories.test.js on lines 23..28
webpack/scenes/Organizations/__tests__/OrganizationReducer.test.js on lines 23..28
webpack/scenes/Subscriptions/Details/__tests__/SubscriptionDetailReducer.test.js on lines 22..27
webpack/scenes/Subscriptions/Manifest/__tests__/ManifestHistoryReducer.test.js on lines 23..28
webpack/scenes/Subscriptions/UpstreamSubscriptions/__tests__/UpstreamSubscriptionsReducer.test.js on lines 46..51

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 48.

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