Katello/katello

View on GitHub

Showing 1,706 of 2,650 total issues

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

  await patientlyWaitFor(() => {
    expect(queryByText('test_acs')).toBeInTheDocument();
    expect(queryByText('Details')).toBeInTheDocument();
    expect(queryByText('Smart proxies')).toBeInTheDocument();
    expect(queryByText('centos7-katello-devel-stable.example.com')).toBeInTheDocument();
webpack/scenes/AlternateContentSources/Details/__tests__/ACSExpandableDetails.test.js on lines 81..89

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

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.certs = function () {
                var deferred = $q.defer();

                ContentCredential.queryUnpaged(function (contentCredentials) {
                    var results = contentCredentials.results;
engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/repository-details-info.controller.js on lines 37..55

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

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.gpgKeys = function () {
                var deferred = $q.defer();

                ContentCredential.queryUnpaged(function (contentCredentials) {
                    var results = contentCredentials.results;
engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/repository-details-info.controller.js on lines 57..75

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

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(queryByText('test_acs')).toBeInTheDocument();
    expect(queryByText('Details')).toBeInTheDocument();
    expect(queryByText('Smart proxies')).toBeInTheDocument();
    expect(queryByText('URL and subpaths')).toBeInTheDocument();
webpack/scenes/AlternateContentSources/Details/__tests__/ACSExpandableDetails.test.js on lines 69..77

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

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

export const getPackageGroupsComparison = (versionOne, versionTwo, viewBy, params) => {
  const versions = { content_view_version_ids: [versionOne, versionTwo] };
  const restrictComparison = { restrict_comparison: viewBy };
  const apiParams = { ...versions, ...restrictComparison, ...params };
  const apiUrl = '/package_groups/compare';
webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 92..103
webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 105..116
webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 131..142
webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 144..155
webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 157..168
webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 170..181
webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 183..194
webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 196..207

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

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

export const getErrataComparison = (versionOne, versionTwo, viewBy, params) => {
  const versions = { content_view_version_ids: [versionOne, versionTwo] };
  const restrictComparison = { restrict_comparison: viewBy };
  const apiParams = { ...versions, ...restrictComparison, ...params };
  const apiUrl = '/errata/compare';
webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 92..103
webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 105..116
webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 118..129
webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 144..155
webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 157..168
webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 170..181
webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 183..194
webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 196..207

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

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

export const getDebPackagesComparison = (versionOne, versionTwo, viewBy, params) => {
  const versions = { content_view_version_ids: [versionOne, versionTwo] };
  const restrictComparison = { restrict_comparison: viewBy };
  const apiParams = { ...versions, ...restrictComparison, ...params };
  const apiUrl = '/debs/compare';
webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 92..103
webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 105..116
webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 118..129
webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 131..142
webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 144..155
webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 170..181
webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 183..194
webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 196..207

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

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

export const getContainerManifestListsComparison = (versionOne, versionTwo, viewBy, params) => {
  const versions = { content_view_version_ids: [versionOne, versionTwo] };
  const restrictComparison = { restrict_comparison: viewBy };
  const apiParams = { ...versions, ...restrictComparison, ...params };
  const apiUrl = '/docker_manifest_lists/compare';
webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 92..103
webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 105..116
webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 118..129
webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 131..142
webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 144..155
webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 157..168
webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 170..181
webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 196..207

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

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

export const getModuleStreamsComparison = (versionOne, versionTwo, viewBy, params) => {
  const versions = { content_view_version_ids: [versionOne, versionTwo] };
  const restrictComparison = { restrict_comparison: viewBy };
  const apiParams = { ...versions, ...restrictComparison, ...params };
  const apiUrl = '/module_streams/compare';
webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 92..103
webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 105..116
webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 118..129
webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 131..142
webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 157..168
webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 170..181
webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 183..194
webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 196..207

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

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

export const getFilesComparison = (versionOne, versionTwo, viewBy, params) => {
  const versions = { content_view_version_ids: [versionOne, versionTwo] };
  const restrictComparison = { restrict_comparison: viewBy };
  const apiParams = { ...versions, ...restrictComparison, ...params };
  const apiUrl = '/files/compare';
webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 92..103
webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 105..116
webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 118..129
webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 131..142
webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 144..155
webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 157..168
webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 170..181
webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 183..194

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

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

export const getRPMPackagesComparison = (versionOne, versionTwo, viewBy, params) => {
  const versions = { content_view_version_ids: [versionOne, versionTwo] };
  const restrictComparison = { restrict_comparison: viewBy };
  const apiParams = { ...versions, ...restrictComparison, ...params };
  const apiUrl = '/packages/compare';
webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 105..116
webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 118..129
webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 131..142
webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 144..155
webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 157..168
webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 170..181
webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 183..194
webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 196..207

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

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

export const getDockerTagsComparison = (versionOne, versionTwo, viewBy, params) => {
  const versions = { content_view_version_ids: [versionOne, versionTwo] };
  const restrictComparison = { restrict_comparison: viewBy };
  const apiParams = { ...versions, ...restrictComparison, ...params };
  const apiUrl = '/docker_tags/compare';
webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 92..103
webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 105..116
webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 118..129
webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 131..142
webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 144..155
webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 157..168
webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 183..194
webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 196..207

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

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

export const getRepositoriesComparison = (versionOne, versionTwo, viewBy, params) => {
  const versions = { content_view_version_ids: [versionOne, versionTwo] };
  const restrictComparison = { restrict_comparison: viewBy };
  const apiParams = { ...versions, ...restrictComparison, ...params };
  const apiUrl = '/repositories/compare';
webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 92..103
webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 118..129
webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 131..142
webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 144..155
webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 157..168
webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 170..181
webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 183..194
webpack/scenes/ContentViews/Details/ContentViewDetailActions.js on lines 196..207

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

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

  await act(async () => {
    userEvent.click(envRadio); // Select the Library environment

    const cvDropdown = await findByPlaceholderText('Select a content view');
    expect(cvDropdown).toBeInTheDocument();
webpack/components/extensions/Hosts/BulkActions/__tests__/bulkChangeHostCVModal.test.js on lines 109..124

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

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

  await act(async () => {
    userEvent.click(envRadio); // Select the Library environment

    const cvDropdown = await findByPlaceholderText('Select a content view');
    expect(cvDropdown).toBeInTheDocument();
webpack/components/extensions/HostDetails/Cards/ContentViewDetailsCard/__tests__/changeHostCVModal.test.js on lines 107..122

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

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

  contextPrototype.fillRect = function(aX, aY, aWidth, aHeight) {
    var oldPath = this.currentPath_;
    this.beginPath();

    this.moveTo(aX, aY);
Severity: Major
Found in app/assets/javascripts/katello/html5/excanvas.js and 1 other location - About 5 hrs to fix
app/assets/javascripts/katello/html5/excanvas.js on lines 721..733

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

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

  contextPrototype.strokeRect = function(aX, aY, aWidth, aHeight) {
    var oldPath = this.currentPath_;
    this.beginPath();

    this.moveTo(aX, aY);
Severity: Major
Found in app/assets/javascripts/katello/html5/excanvas.js and 1 other location - About 5 hrs to fix
app/assets/javascripts/katello/html5/excanvas.js on lines 735..747

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

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

export const loadManifestHistory = (extendedParams = {}) => async (dispatch) => {
  dispatch({ type: MANIFEST_HISTORY_REQUEST });

  const params = {
    ...propsToSnakeCase(extendedParams),
Severity: Major
Found in webpack/scenes/Subscriptions/Manifest/ManifestActions.js and 4 other locations - About 5 hrs to fix
webpack/scenes/Subscriptions/Manifest/ManifestActions.js on lines 51..67
webpack/scenes/Subscriptions/Manifest/ManifestActions.js on lines 69..85
webpack/scenes/Subscriptions/Manifest/ManifestActions.js on lines 101..117
webpack/scenes/Subscriptions/Manifest/ManifestActions.js on lines 119..135

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

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

export const enableSimpleContentAccess = (extendedParams = {}) => async (dispatch) => {
  dispatch({ type: ENABLE_SIMPLE_CONTENT_ACCESS_REQUEST });

  const params = {
    ...propsToSnakeCase(extendedParams),
Severity: Major
Found in webpack/scenes/Subscriptions/Manifest/ManifestActions.js and 4 other locations - About 5 hrs to fix
webpack/scenes/Subscriptions/Manifest/ManifestActions.js on lines 51..67
webpack/scenes/Subscriptions/Manifest/ManifestActions.js on lines 69..85
webpack/scenes/Subscriptions/Manifest/ManifestActions.js on lines 119..135
webpack/scenes/Subscriptions/Manifest/ManifestActions.js on lines 137..153

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

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

export const deleteManifest = (extendedParams = {}) => async (dispatch) => {
  dispatch({ type: DELETE_MANIFEST_REQUEST });

  const params = {
    ...propsToSnakeCase(extendedParams),
Severity: Major
Found in webpack/scenes/Subscriptions/Manifest/ManifestActions.js and 4 other locations - About 5 hrs to fix
webpack/scenes/Subscriptions/Manifest/ManifestActions.js on lines 51..67
webpack/scenes/Subscriptions/Manifest/ManifestActions.js on lines 101..117
webpack/scenes/Subscriptions/Manifest/ManifestActions.js on lines 119..135
webpack/scenes/Subscriptions/Manifest/ManifestActions.js on lines 137..153

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

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