Katello/katello

View on GitHub

Showing 2,737 of 2,737 total issues

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

import React from 'react';
import { renderWithRedux, patientlyWaitFor, fireEvent, act } from 'react-testing-lib-wrapper';
import { Route } from 'react-router-dom';

import ContentViewFilterDetails from '../ContentViewFilterDetails';

    Function CVErrataIDFilterContent has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring.
    Open

    const CVErrataIDFilterContent = ({
      cvId, filterId, showAffectedRepos, setShowAffectedRepos, details,
    }) => {
      const dispatch = useDispatch();
      const { results: filterResults } =

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Method multi_copy_units has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring.
    Open

            def multi_copy_units(repo_id_map, dependency_solving)
              tasks = []
    
              if repo_id_map.values.pluck(:content_unit_hrefs).flatten.any?
                data = PulpRpmClient::Copy.new
    Severity: Minor
    Found in app/services/katello/pulp3/repository/yum.rb - About 4 hrs to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

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

          {!!numberOfActivationKeys &&
            <ActionSummary
              title={__('Activation keys')}
              text={
                <FormattedMessage
    webpack/scenes/ContentViews/Details/Versions/BulkDelete/Steps/ConfirmBulkDelete.js on lines 86..103

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

    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

          {!!numberOfHosts &&
            <ActionSummary
              title={__('Hosts')}
              text={
                <FormattedMessage
    webpack/scenes/ContentViews/Details/Versions/BulkDelete/Steps/ConfirmBulkDelete.js on lines 104..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 130.

    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

    Function CVReassignHostsForm has 118 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    const CVReassignHostsForm = () => {
      const dispatch = useDispatch();
      const contentViewsInEnvResponse = useSelector(state => selectContentViews(state, 'host'));
      const contentViewsInEnvStatus = useSelector(state => selectContentViewStatus(state, 'host'));
      const contentViewsInEnvError = useSelector(state => selectContentViewError(state, 'host'));

      Function render has 118 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        render() {
          const { upstreamSubscriptions } = this.props;
      
          const getSubscriptionActions = () => {
            let actions = '';

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

          const fetchItems = useCallback((params) => {
            const adjustedParams = { ...params };
            switch (selectedIndex) {
            case 0:
              adjustedParams.show_all_for = 'content_view_filter';
        webpack/scenes/ContentViews/Details/Filters/CVPackageGroupFilterContent.js on lines 75..94

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

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

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

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

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

        Refactorings

        Further Reading

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

          const fetchItems = useCallback((params) => {
            const adjustedParams = { ...params };
            switch (selectedIndex) {
            case 0:
              adjustedParams.show_all_for = 'content_view_filter';
        webpack/scenes/ContentViews/Details/Filters/CVModuleStreamFilterContent.js on lines 79..98

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

        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 SubscriptionsPage.js has 362 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        import React, { Component } from 'react';
        import { FormattedMessage } from 'react-intl';
        import PropTypes from 'prop-types';
        import Immutable from 'seamless-immutable';
        import { translate as __ } from 'foremanReact/common/I18n';
        Severity: Minor
        Found in webpack/scenes/Subscriptions/SubscriptionsPage.js - About 4 hrs to fix

          Function CVEnvironmentSelectionForm has 117 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          const CVEnvironmentSelectionForm = () => {
            const [alertDismissed, setAlertDismissed] = useState(false);
            const {
              versionNameToRemove, versionEnvironments, selectedEnvSet,
              setAffectedActivationKeys, setAffectedHosts, deleteFlow,

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

                  <TextContent>
                    <Text ouiaId="mpw-step-3-header" component={TextVariants.h3}>
                      {__('Review')}
                    </Text>
                    <Text ouiaId="mpw-step-3-content" component={TextVariants.p}>
            webpack/components/extensions/Hosts/BulkActions/BulkErrataWizard/04_Review.js on lines 95..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 128.

            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

                  <TextContent>
                    <Text ouiaId="mew-step-3-header" component={TextVariants.h3}>
                      {__('Review')}
                    </Text>
                    <Text ouiaId="mew-step-3-content" component={TextVariants.p}>
            webpack/components/extensions/Hosts/BulkActions/BulkPackagesWizard/04_Review.js on lines 102..115

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

            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

            Function CVReassignActivationKeysForm has 116 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            const CVReassignActivationKeysForm = () => {
              const dispatch = useDispatch();
              const contentViewsInEnvResponse = useSelector(selectContentViews);
              const contentViewsInEnvStatus = useSelector(selectContentViewStatus);
              const contentViewsInEnvError = useSelector(selectContentViewError);

              Function ACSReview has 116 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              const ACSReview = () => {
                const {
                  name, description, acsType, contentType,
                  smartProxies, useHttpProxies, url, subpaths, verifySSL,
                  authentication, sslCertName, sslKeyName, username,
              Severity: Major
              Found in webpack/scenes/AlternateContentSources/Create/Steps/ACSReview.js - About 4 hrs to fix

                File ACSEditCredentials.js has 360 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                import React, { useEffect, useState } from 'react';
                import { useDispatch, useSelector } from 'react-redux';
                import PropTypes from 'prop-types';
                import { translate as __ } from 'foremanReact/common/I18n';
                import { STATUS } from 'foremanReact/constants';

                  Function content_actions has 115 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  KT.content_actions = (function () {
                    var syncing = [],
                      updater,
                      getOrg = function () {
                        return $("#organization_id").val();
                  Severity: Major
                  Found in app/assets/javascripts/katello/sync_management/sync_management.js - About 4 hrs to fix

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

                                    success = function (response) {
                                        Notification.setSuccessMessage(translate('Added %x products to sync plan "%y".')
                                            .replace('%x', $scope.table.numSelected).replace('%y', $scope.syncPlan.name));
                                        $scope.table.working = false;
                                        $scope.table.selectAll(false);
                    engines/bastion_katello/app/assets/javascripts/bastion_katello/sync-plans/details/sync-plan-products.controller.js on lines 53..61

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

                    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

                        {
                          name: 'DevelServerCA',
                          content_type: 'cert',
                          content: '-----BEGIN CERTIFICATE-----\r\nMIIHHzCCBQegAwIBAgIJAIUIoI5kWBt2MA0GCSqGSIb3DQEBCwUAMIGTMQswCQYD\r\nVQQGEwJVUzEXMBUGA1UECAwOTm9ydGggQ2Fyb2xpbmExEDAOBgNVBAcMB1JhbGVp\r\nZ2gxEDAOBgNVBAoMB0thdGVsbG8xFDASBgNVBAsMC1NvbWVPcmdVbml0MTEwLwYD\r\nVQQDDChjZW50b3M3LWthdGVsbG8tZGV2ZWwuanR1cmVsLmV4YW1wbGUuY29tMB4X\r\nDTIxMDcyOTE1MDgwNVoXDTM4MDExODE1MDgwNVowgZMxCzAJBgNVBAYTAlVTMRcw\r\nFQYDVQQIDA5Ob3J0aCBDYXJvbGluYTEQMA4GA1UEBwwHUmFsZWlnaDEQMA4GA1UE\r\nCgwHS2F0ZWxsbzEUMBIGA1UECwwLU29tZU9yZ1VuaXQxMTAvBgNVBAMMKGNlbnRv\r\nczcta2F0ZWxsby1kZXZlbC5qdHVyZWwuZXhhbXBsZS5jb20wggIiMA0GCSqGSIb3\r\nDQEBAQUAA4ICDwAwggIKAoICAQC4WsCZQpmOrRis/o9IsyW03vUon4FXPD00zm33\r\nykygAktyD93FAY0QhDMGnir+c9Uo3kU194QDyLTcGrOTw2POLHR/GDX7G4H5qEO9\r\nq1ZrGho4bYcgFqMBaGtFwpOuU4MhbgbKnwvfqNqPypshNpah74zcih9tey7fyCxd\r\nSIkarp8zB1bGcec5uvVDEd1EwjnrCSGx7Me1v61n0Fb7SrGlPa3qJC2bsL+jj1DF\r\nMukGEVsUxqvRMXe6i1jy4W7rWNUIsX2vIne1wup4qeojJy9zWWhwi5aGx6mIsUHN\r\nCqyfG+qNgkuJ1DfaZ2DwC8VJ6H17Gzzw7HdkQ4aYqk1hGvpJMS2WXR3vsP7OUO1S\r\n3qeGipksp5e/IEVX7fq+RUEMwrTDDgBsIeHL8R9hOsdtdqOm4RJ1IcGG0tgM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AXjwwZ2R4438mR2K252fbzts0LS\r\nq9Dfx1XK0HmS0l5dhMFYfBQ4nY0ZQ/jgb/h8SxLTeKPJOHHdhzse6IL1f2rBIWL2\r\nmH7bLn8rfQaqyXZh/iKpY/xxVauCSsQcYVNaXOF66h20/wtPIQWx1xxzgnUa3/xW\r\nuMCocIzG3vBBBDeVs8M0mTTxMGRtfx2KMj7wZv6trq2SSyUtVk1CWn80iv8PQUfn\r\nOQwecX1cMdh5K21fK16aAlB48VKXpuxKQPxGYdNSFYVnadMgXvdQAyofjwGWCzWL\r\n9C/N37gtz8WsFXr54QYWkKlbuvYM1tuUNaZdySTW0RPO4Eqbmogh3ffDtrq8RaHh\r\nPBtTLwxf0LZgqqOCxGFhgPrVt3vhj8K9G5IC9dzl7lGamQ8YDJRuBkAhmtD5yxL7\r\nwAmqhAMBTDvNRT83b9WiMAakRVjuWgwIcDwzgeCErjCPCVTFP7Gvl1HveVvFsPXR\r\n7GZO\r\n-----END CERTIFICATE-----\r\n',
                          id: 6,
                    webpack/scenes/ContentCredentials/__tests__/contentCredentials.fixtures.js on lines 43..69

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

                    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

                        {
                          name: 'UpstreamServerCA',
                          content_type: 'cert',
                          content: '-----BEGIN CERTIFICATE-----\nMIIHGTCCBQGgAwIBAgIJAK+PvWdMGcRbMA0GCSqGSIb3DQEBCwUAMIGRMQswCQYD\nVQQGEwJVUzEXMBUGA1UECAwOTm9ydGggQ2Fyb2xpbmExEDAOBgNVBAcMB1JhbGVp\nZ2gxEDAOBgNVBAoMB0thdGVsbG8xFDASBgNVBAsMC1NvbWVPcmdVbml0MS8wLQYD\nVQQDDCZjZW50b3M3LWthdGVsbG8tNC0yLmp0dXJlbC5leGFtcGxlLmNvbTAeFw0y\nMTEwMjYxNTQzMjlaFw0zODAxMTcxNTQzMjlaMIGRMQswCQYDVQQGEwJVUzEXMBUG\nA1UECAwOTm9ydGggQ2Fyb2xpbmExEDAOBgNVBAcMB1JhbGVpZ2gxEDAOBgNVBAoM\nB0thdGVsbG8xFDASBgNVBAsMC1NvbWVPcmdVbml0MS8wLQYDVQQDDCZjZW50b3M3\nLWthdGVsbG8tNC0yLmp0dXJlbC5leGFtcGxlLmNvbTCCAiIwDQYJKoZIhvcNAQEB\nBQADggIPADCCAgoCggIBALKfp6gXOiyUU9z7b1Zrg4arCQ1QK8J2PvwVJo+NeNZC\nVnUzw3hof0rIovL4/cUUpZYGtCME0PSthxsnYwRSXALW2Gmy3qIm6k+3K524+yYX\n9PWE1CVCPjgboLfBIrkb1WlviZZ4pKdoPxF2DUUksw4T9inpeir/Nlul9dEvbGHw\nIXkNxolVrkrD2bD9C0z+JjzfLwlJ8CH/FX/tan3jMUqKF70Gi5MEyL6TDhHmduGG\nNPywwdC5oH6jUg94w38SdVovI7uHb/Pu5Kgw9sVBAZ4I+7vQqFL0M8YG/Di/kp/V\nLlqqRxjn1T7FepMo/gNWb3Yc9ZBcSyxHgqHlZi/dy4zW+l/y3OgCGekGkma5IjzY\n9qJyNxGUXennAMkjW1+P40CLFuqN77rmV7dYwIR+jcPmzhz1eEhkLNyNfvcQlVTf\nCCkqaX53kVH4Cu4MFcWFs74W9v5BiPyd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VeuoqRAvWt4NrN0emEgDGlXn+gybS\nbU4s2GotQQKgqbmk9yA0/ZsZbd8zAV13CtRhiApsCPwO6YmIgzG0yqbM8VV6hATo\nkYiLmrgaMaIUJpyZze7P4PDSwAeMjqXs9p4oYA/aBD+pJ+OWI/PhPIdyl5e4kr7L\ne8hZkcuOo7Mw7kyvjKWo8zI/v9NJVSDAFXvBWVY+nYXLc7ovfX/msYgvyF2ylAHq\nNqJR6OZQoS1nWz2kYRqn4p3ygNSKUfctNA24CgorMqKLJ0XNJEBSoNV9rRczKghY\nXKScr3j4HnfLeyHmIo05XFPCCh1SfnQDG0H0rDHXNGABJhfNc35Y6TyXZhUgMxit\nQ9Vgl2JTl8+5swzfVdLemBXg4N6ITISkvyL3/keCca3U+4UTPCw9w/qx7+pd\n-----END CERTIFICATE-----',
                          id: 4,
                    webpack/scenes/ContentCredentials/__tests__/contentCredentials.fixtures.js on lines 16..42

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

                    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