gitlabhq/gitlabhq

View on GitHub

Showing 1,520 of 2,143 total issues

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

  def change_status(noteable, project, author, status, source = nil)
Severity: Minor
Found in app/services/system_note_service.rb - About 35 mins to fix

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

      def perform(project_id, user_id, ref, source, params = {})
    Severity: Minor
    Found in app/workers/create_pipeline_worker.rb - About 35 mins to fix

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

          def issue_moved_email(recipient, issue, new_issue, updated_by_user, reason = nil)
      Severity: Minor
      Found in app/mailers/emails/issues.rb - About 35 mins to fix

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

              def perform(table, copy_from, copy_to, start_id, end_id)
        Severity: Minor
        Found in lib/gitlab/background_migration/copy_column.rb - About 35 mins to fix

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

                def initialize(text, type, index, old_pos, new_pos, parent_file: nil, line_code: nil, rich_text: nil)
          Severity: Minor
          Found in lib/gitlab/diff/line.rb - About 35 mins to fix

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

                  def perform(model, attribute_from, attribute_to, start_id, stop_id)
            Severity: Minor
            Found in lib/gitlab/background_migration/digest_column.rb - About 35 mins to fix

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

                    def initialize(repo, name, namespace, current_user, session_data)
              Severity: Minor
              Found in lib/gitlab/bitbucket_import/project_creator.rb - About 35 mins to fix

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

                      def find_commits_by_message(query, ref, path, limit, offset)
                Severity: Minor
                Found in lib/gitlab/git/repository.rb - About 35 mins to fix

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

                        def update_page(page_path, title, format, content, commit_details)
                  Severity: Minor
                  Found in lib/gitlab/gitaly_client/wiki_service.rb - About 35 mins to fix

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

                        def initialize(name, title, description, preview, logo = 'illustrations/gitlab_logo.svg')
                    Severity: Minor
                    Found in lib/gitlab/project_template.rb - About 35 mins to fix

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

                            def merge(user, source_sha, target_branch, message, &block)
                      Severity: Minor
                      Found in lib/gitlab/git/repository.rb - About 35 mins to fix

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

                                def between(repo, head, base, options = {}, *paths)
                        Severity: Minor
                        Found in lib/gitlab/git/diff.rb - About 35 mins to fix

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

                                def initialize(repo, name, namespace, current_user, session_data, type: 'github')
                          Severity: Minor
                          Found in lib/gitlab/legacy_github_import/project_creator.rb - About 35 mins to fix

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

                                  def update_page(page_path, title, format, content, commit_details)
                            Severity: Minor
                            Found in lib/gitlab/git/wiki.rb - About 35 mins to fix

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

                                      def handle_line(action, time, name, marker_start, marker_end)
                              Severity: Minor
                              Found in lib/gitlab/ci/trace/section_parser.rb - About 35 mins to fix

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

                                      def gitaly_update_page(page_path, title, format, content, commit_details)
                                Severity: Minor
                                Found in lib/gitlab/git/wiki.rb - About 35 mins to fix

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

                                        def initialize(repo, fb_session, namespace, current_user, user_map = nil)
                                  Severity: Minor
                                  Found in lib/gitlab/fogbugz_import/project_creator.rb - About 35 mins to fix

                                    Function types.RECEIVE_TRACE_SUCCESS has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                    Open

                                      [types.RECEIVE_TRACE_SUCCESS](state, log) {
                                        if (log.state) {
                                          state.traceState = log.state;
                                        }
                                    
                                    
                                    Severity: Minor
                                    Found in app/assets/javascripts/jobs/store/mutations.js - About 35 mins 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

                                    Function trigger has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                    Open

                                      trigger: function trigger(getEntireList) {
                                        var config = this.hook.config.AjaxFilter;
                                        var searchValue = this.trigger.value;
                                        if (!config || !config.endpoint || !config.searchKey) {
                                          return;
                                    Severity: Minor
                                    Found in app/assets/javascripts/droplab/plugins/ajax_filter.js - About 35 mins 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

                                    Function types.DISCARD_FILE_CHANGES has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                    Open

                                      [types.DISCARD_FILE_CHANGES](state, path) {
                                        const stagedFile = state.stagedFiles.find(f => f.path === path);
                                        const entry = state.entries[path];
                                        const { deleted, prevPath } = entry;
                                    
                                    
                                    Severity: Minor
                                    Found in app/assets/javascripts/ide/stores/mutations/file.js - About 35 mins 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

                                    Severity
                                    Category
                                    Status
                                    Source
                                    Language