gitlabhq/gitlabhq

View on GitHub

Showing 1,391 of 2,006 total issues

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

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

                    def merge_to_ref(user, source_sha, branch, target_ref, message)
              Severity: Minor
              Found in lib/gitlab/git/repository.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 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 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

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

                      export function getFormData(params) {
                        const {
                          commit,
                          note,
                          noteableType,
                      Severity: Minor
                      Found in app/assets/javascripts/diffs/store/utils.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 toggleCollapsedSidebar has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                      Open

                        toggleCollapsedSidebar(collapsed, saveCookie) {
                          const breakpoint = bp.getBreakpointSize();
                          const dbp = ContextualSidebar.isDesktopBreakpoint();
                      
                          if (this.$sidebar.length) {
                      Severity: Minor
                      Found in app/assets/javascripts/contextual_sidebar.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

                      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 getCategoryContents has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                      Open

                        getCategoryContents() {
                          const userName = gon.current_username;
                          const { projectOptions, groupOptions, dashboardOptions } = gl;
                      
                          // Get options
                      Severity: Minor
                      Found in app/assets/javascripts/search_autocomplete.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 constructor has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                      Open

                        constructor(obj, defaultAvatar) {
                          this.id = obj.id;
                          this._uid = this.guid();
                          this.position = obj.position;
                          this.title = obj.list_type === 'backlog' ? __('Open') : obj.title;
                      Severity: Minor
                      Found in app/assets/javascripts/boards/models/list.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 highlighter has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                      Open

                      const highlighter = function(element, text, matches) {
                        var highlightText, j, lastIndex, len, matchIndex, matchedChars, unmatched;
                        lastIndex = 0;
                        highlightText = '';
                        matchedChars = [];
                      Severity: Minor
                      Found in app/assets/javascripts/project_find_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

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

                        message() {
                          if (this.errorCode === window.u2f.ErrorCodes.BAD_REQUEST && this.httpsDisabled) {
                            return __(
                              'U2F only works with HTTPS-enabled websites. Contact your administrator for more details.',
                            );
                      Severity: Minor
                      Found in app/assets/javascripts/u2f/error.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 getData has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                      Open

                        getData(term, callback) {
                          if (!term) {
                            const contents = this.getCategoryContents();
                            if (contents) {
                              const glDropdownInstance = this.searchInput.data('glDropdown');
                      Severity: Minor
                      Found in app/assets/javascripts/search_autocomplete.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