Katello/katello

View on GitHub

Showing 2,737 of 2,737 total issues

File ContentViewVersions.js has 393 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import React, { useState, useEffect, useCallback } from 'react';
import { useDispatch, useSelector } from 'react-redux';
import { TableVariant, TableText, Tbody, Thead, Td, Tr, Th } from '@patternfly/react-table';
import { Checkbox, Dropdown, DropdownItem, Grid, KebabToggle, GridItem, Button } from '@patternfly/react-core';
import { translate as __ } from 'foremanReact/common/I18n';
Severity: Minor
Found in webpack/scenes/ContentViews/Details/Versions/ContentViewVersions.js - About 5 hrs to fix

    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('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

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

    File ContentViewVersionDetailConfig.js has 384 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    import React from 'react';
    import PropTypes from 'prop-types';
    import { translate as __ } from 'foremanReact/common/I18n';
    import { urlBuilder } from 'foremanReact/common/urlHelpers';
    import LongDateTime from 'foremanReact/components/common/dates/LongDateTime';

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

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

      Class RepositoriesController has 39 methods (exceeds 20 allowed). Consider refactoring.
      Open

        class Api::V2::RepositoriesController < Api::V2::ApiController # rubocop:disable Metrics/ClassLength
          include Katello::Concerns::FilteredAutoCompleteSearch
      
          generic_repo_wrap_params = []
          RepositoryTypeManager.generic_remote_options(defined_only: true).each do |option|
      Severity: Minor
      Found in app/controllers/katello/api/v2/repositories_controller.rb - About 5 hrs to fix

        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

        File yum.rb has 380 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        require 'pulp_rpm_client'
        
        module Katello
          module Pulp3
            class Repository
        Severity: Minor
        Found in app/services/katello/pulp3/repository/yum.rb - About 5 hrs to fix

          File nutupane.factory.js has 379 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          /**
           * @ngdoc service
           * @name  Bastion.components.service:Nutupane
           *
           * @requires $location
            Severity
            Category
            Status
            Source
            Language