Katello/katello

View on GitHub

Showing 2,737 of 2,737 total issues

Function DebContentViewsController has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

    function DebContentViewsController($scope, Nutupane, ContentViewVersion, CurrentOrganization, translate) {

    Function ContentCredentialProductsController has 5 arguments (exceeds 4 allowed). Consider refactoring.
    Open

        function ContentCredentialProductsController($scope, Nutupane, ContentCredential, ApiErrorHandler, translate) {

      Function FilesController has 5 arguments (exceeds 4 allowed). Consider refactoring.
      Open

          function FilesController($scope, Nutupane, File, CurrentOrganization, translate) {

        Function FileRepositoriesController has 5 arguments (exceeds 4 allowed). Consider refactoring.
        Open

            function FileRepositoriesController($scope, Nutupane, Repository, CurrentOrganization, translate) {

          Function ContentCredentialACSController has 5 arguments (exceeds 4 allowed). Consider refactoring.
          Open

              function ContentCredentialACSController($scope, Nutupane, ContentCredential, ApiErrorHandler, translate) {

            Function ContentCredentialRepositoriesController has 5 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                function ContentCredentialRepositoriesController($scope, Nutupane, ContentCredential, ApiErrorHandler, translate) {

              Function FileContentViewsController has 5 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                  function FileContentViewsController($scope, Nutupane, ContentViewVersion, CurrentOrganization, translate) {

                Function DebRepositoriesController has 5 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                    function DebRepositoriesController($scope, Nutupane, Repository, CurrentOrganization, translate) {

                  Method update has 5 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                            def update(url, client_cert, client_key, ca_file, attributes)
                  Severity: Minor
                  Found in app/lib/katello/resources/candlepin/upstream_consumer.rb - About 35 mins to fix

                    Method plan_copy has 5 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                            def plan_copy(action_class, source_repo, target_repo, clauses = nil, override_config = nil)
                    Severity: Minor
                    Found in app/lib/actions/katello/content_view_version/incremental_update.rb - About 35 mins to fix

                      Method repos_to_sync has 5 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                              def repos_to_sync(smart_proxy, environment, content_view, repository, skip_metatadata_check = false)
                      Severity: Minor
                      Found in app/lib/actions/katello/capsule_content/sync_capsule.rb - About 35 mins to fix

                        Method initialize has 5 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                                def initialize(url, crawled = [], found = [], to_follow = [],
                                               upstream_credentials_and_search = {
                                                 upstream_username: nil,
                                                 upstream_password: nil,
                                                 search: '*'
                        Severity: Minor
                        Found in app/lib/katello/resources/discovery/container.rb - About 35 mins to fix

                          Method initialize has 5 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

                                  def initialize(url, crawled = [], found = [], to_follow = [],
                                                 upstream_credentials_and_search = {
                                                   upstream_username: nil,
                                                   upstream_password: nil
                                                 })
                          Severity: Minor
                          Found in app/lib/katello/resources/discovery/yum.rb - About 35 mins to fix

                            Method validate_length has 5 arguments (exceeds 4 allowed). Consider refactoring.
                            Open

                                  def self.validate_length(record, attribute, value, max_length = 128, min_length = 1)
                            Severity: Minor
                            Found in app/lib/katello/validators/katello_label_format_validator.rb - About 35 mins to fix

                              Method plan has 5 arguments (exceeds 4 allowed). Consider refactoring.
                              Open

                                      def plan(url, content_type, upstream_username, upstream_password, search)
                              Severity: Minor
                              Found in app/lib/actions/katello/repository/discover.rb - About 35 mins to fix

                                Method plan has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                Open

                                        def plan(version, environments, is_force = false, description = nil, incremental_update = false)
                                Severity: Minor
                                Found in app/lib/actions/katello/content_view/promote.rb - About 35 mins to fix

                                  Method metadata_generate has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                  Open

                                          def metadata_generate(source_repositories, new_repository, filters, rpm_filenames, matching_content)
                                  Severity: Minor
                                  Found in app/lib/actions/katello/repository/clone_contents.rb - About 35 mins to fix

                                    Method plan has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                    Open

                                            def plan(host, service_level, purpose_role, purpose_usage, purpose_addons)
                                    Severity: Minor
                                    Found in app/lib/actions/katello/host/update_system_purpose.rb - About 35 mins to fix

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

                                            def with_identifiers(ids)
                                              ids = [ids] unless ids.is_a?(Array)
                                              ids.map!(&:to_s)
                                              id_integers = ids.map { |string| Integer(string) rescue -1 }
                                              where("#{self.table_name}.id in (?) or #{self.table_name}.pulp_id in (?)", id_integers, ids)
                                      Severity: Minor
                                      Found in app/models/katello/concerns/pulp_database_unit.rb and 1 other location - About 35 mins to fix
                                      app/models/katello/glue/candlepin/candlepin_object.rb on lines 41..45

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

                                      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

                                            def with_identifiers(ids)
                                              ids = [ids] unless ids.is_a?(Array)
                                              ids.map!(&:to_s)
                                              id_integers = ids.map { |string| Integer(string) rescue -1 }
                                              where("#{self.table_name}.id = (?) or #{self.table_name}.cp_id = (?)", id_integers, ids)
                                      Severity: Minor
                                      Found in app/models/katello/glue/candlepin/candlepin_object.rb and 1 other location - About 35 mins to fix
                                      app/models/katello/concerns/pulp_database_unit.rb on lines 163..167

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

                                      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