Katello/katello

View on GitHub

Showing 2,737 of 2,737 total issues

Function getEnableTracerButton has 30 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  const getEnableTracerButton = () => {
    const [viaRex] = dropdownOptions;
    if (selectedOption === viaRex) {
      return (
        <Button

    Function link has 30 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

                link: function (scope) {
                    var breadcrumbs = $breadcrumb.getStatesChain(), listUrl, unregisterWatcher;
                    scope.table = {rows: []};
    
                    if (breadcrumbs.length > 0) {

      Method import_data has 30 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

            def import_data(index_hosts_and_activation_keys = false)
              pool_attributes = {}.with_indifferent_access
              pool_json = self.backend_data
      
              product_attributes = pool_json["productAttributes"] + pool_json["attributes"]
      Severity: Minor
      Found in app/models/katello/glue/candlepin/pool.rb - About 1 hr to fix

        Method pending_message has 30 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            def pending_message
              # Retrieve a text message that may be rendered for a 'pending' task's status.  This is used in various places,
              # such as System Event history.
              details = TaskStatus::TYPES[self.task_type]
              case details[:type]
        Severity: Minor
        Found in app/models/katello/task_status.rb - About 1 hr to fix

          Method build_clone has 30 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              def build_clone(options)
                to_env       = options[:environment]
                version      = options[:version]
                content_view = options[:content_view] || to_env.default_content_view
                to_version   = version || content_view.version(to_env)
          Severity: Minor
          Found in app/models/katello/repository.rb - About 1 hr to fix

            Method register_host has 30 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                  def register_host(host, consumer_params, content_view_environments, activation_keys = [])
                    new_host = host.new_record?
                    unless new_host
                      host.save!
                      # Keep the kickstart repository ID so the host's Medium isn't unset
            Severity: Minor
            Found in app/services/katello/registration_manager.rb - About 1 hr to fix

              Method import_all has 30 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  def import_all(filtered_indexing = false)
                    association_tracker = RepoAssociationTracker.new(@content_type, @service_class, @repository)
                    units_from_pulp.each do |units|
                      units.each do |unit|
                        association_tracker.push(unit)
              Severity: Minor
              Found in app/services/katello/content_unit_indexer.rb - About 1 hr to fix

                Method plan has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                        def plan(root)
                          sequence do
                            if root.content_id.nil?
                              content_create = plan_action(Candlepin::Product::ContentCreate,
                                                           owner:         root.product.organization.label,
                Severity: Minor
                Found in app/lib/actions/katello/product/content_create.rb - About 1 hr to fix

                  Method plan has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                          def plan(version_environments, composite_version_environments, content, dep_solve, hosts, description)
                            old_new_version_map = {}
                            output_for_version_ids = []
                  
                            sequence do
                  Severity: Minor
                  Found in app/lib/actions/katello/content_view/incremental_updates.rb - About 1 hr to fix

                    Method sync_plan_permissions has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        def sync_plan_permissions
                          @plugin.permission :view_sync_plans,
                                             {
                                               'katello/api/v2/sync_plans' => [:index, :show, :add_products, :remove_products, :available_products, :auto_complete_search]
                                             },
                    Severity: Minor
                    Found in lib/katello/permission_creator.rb - About 1 hr to fix

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

                        const {
                          getByText, queryByText, getByTestId, getByLabelText,
                        } = renderWithRedux(withCVRoute(<ContentViewFilterDetails
                          cvId={1}
                          details={details}
                      webpack/scenes/ContentViews/Details/Filters/__tests__/CVRpmFilterContent.test.js on lines 198..204
                      webpack/scenes/ContentViews/Details/Filters/__tests__/CVRpmFilterContent.test.js on lines 329..335
                      webpack/scenes/ContentViews/Details/Filters/__tests__/ContentViewPackageGroupFilter.test.js on lines 478..484
                      webpack/scenes/ContentViews/Details/Filters/__tests__/ContentViewPackageGroupFilter.test.js on lines 537..542

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

                      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

                            {...{
                              error,
                              metadata,
                              emptyContentTitle,
                              emptyContentBody,
                      Severity: Major
                      Found in webpack/scenes/SmartProxy/SmartProxyExpandableTable.js and 4 other locations - About 1 hr to fix
                      webpack/scenes/ContentViews/Details/Filters/CVContainerImageFilterContent.js on lines 145..157
                      webpack/scenes/ContentViews/Details/Filters/CVModuleStreamFilterContent.js on lines 217..229
                      webpack/scenes/ContentViews/Details/Filters/CVPackageGroupFilterContent.js on lines 207..219
                      webpack/scenes/ContentViews/Details/Filters/CVRpmFilterContent.js on lines 177..189

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

                      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

                        const {
                          getAllByLabelText, getByLabelText, getByText, queryByText,
                        } =
                          renderWithRedux(withCVRoute(<ContentViewFilterDetails
                            cvId={1}
                      webpack/scenes/ContentViews/Details/Filters/__tests__/CVRpmFilterContent.test.js on lines 198..204
                      webpack/scenes/ContentViews/Details/Filters/__tests__/CVRpmFilterContent.test.js on lines 329..335
                      webpack/scenes/ContentViews/Details/Filters/__tests__/ContentViewPackageGroupFilter.test.js on lines 537..542
                      webpack/scenes/ContentViews/Details/Filters/__tests__/cvModuleStreamFilter.test.js on lines 337..342

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

                      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

                        const {
                          getByText, queryByText, getAllByLabelText, getByLabelText,
                        } =
                          renderWithRedux(withCVRoute(<ContentViewFilterDetails
                            cvId={1}
                      webpack/scenes/ContentViews/Details/Filters/__tests__/CVRpmFilterContent.test.js on lines 198..204
                      webpack/scenes/ContentViews/Details/Filters/__tests__/ContentViewPackageGroupFilter.test.js on lines 478..484
                      webpack/scenes/ContentViews/Details/Filters/__tests__/ContentViewPackageGroupFilter.test.js on lines 537..542
                      webpack/scenes/ContentViews/Details/Filters/__tests__/cvModuleStreamFilter.test.js on lines 337..342

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

                      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

                        const {
                          getAllByText, getByText,
                          findByPlaceholderText, getAllByRole,
                        } = renderWithRedux(<ChangeHostCVModal
                          isOpen
                      webpack/components/extensions/HostDetails/Cards/ContentViewDetailsCard/__tests__/changeHostCVModal.test.js on lines 66..74

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

                      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

                                  {...{
                                    rows,
                                    metadata,
                                    emptyContentTitle,
                                    emptyContentBody,
                      webpack/scenes/ContentViews/Details/Filters/CVContainerImageFilterContent.js on lines 145..157
                      webpack/scenes/ContentViews/Details/Filters/CVModuleStreamFilterContent.js on lines 217..229
                      webpack/scenes/ContentViews/Details/Filters/CVPackageGroupFilterContent.js on lines 207..219
                      webpack/scenes/SmartProxy/SmartProxyExpandableTable.js on lines 58..70

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

                      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

                        details: PropTypes.shape({
                          permissions: PropTypes.shape({}),
                          needs_publish: PropTypes.bool,
                          composite: PropTypes.bool,
                          latest_version_id: PropTypes.number,
                      webpack/scenes/ContentViews/Details/Versions/ContentViewVersions.js on lines 403..408

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

                      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

                        const {
                          getByText, queryByText, getByLabelText, getAllByLabelText,
                        } =
                          renderWithRedux(withCVRoute(<ContentViewFilterDetails
                            cvId={1}
                      webpack/scenes/ContentViews/Details/Filters/__tests__/CVRpmFilterContent.test.js on lines 329..335
                      webpack/scenes/ContentViews/Details/Filters/__tests__/ContentViewPackageGroupFilter.test.js on lines 478..484
                      webpack/scenes/ContentViews/Details/Filters/__tests__/ContentViewPackageGroupFilter.test.js on lines 537..542
                      webpack/scenes/ContentViews/Details/Filters/__tests__/cvModuleStreamFilter.test.js on lines 337..342

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

                      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

                        const { getAllByText }
                           = renderWithRedux(<ChangeHostCVModal
                             isOpen
                             closeModal={jest.fn()}
                             hostId={1}
                      webpack/components/extensions/HostDetails/Cards/ContentViewDetailsCard/__tests__/changeHostCVModal.test.js on lines 87..97

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

                      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

                                {contentCredentials.map(cred =>
                                  <FormSelectOption data-testid="ssl-ca-content-credential-option" key={cred.id} value={cred.id} label={cred.name} />)}
                      webpack/scenes/Subscriptions/Manifest/CdnConfigurationTab/NetworkSyncForm.js on lines 239..240

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

                      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