gitlabhq/gitlabhq

View on GitHub

Showing 1,313 of 1,834 total issues

Method object_link_filter has 35 lines of code (exceeds 25 allowed). Consider refactoring.
Open

      def object_link_filter(text, pattern, link_content: nil, link_reference: false)
        references_in(text, pattern) do |match, id, project_ref, namespace_ref, matches|
          parent_path = if parent_type == :group
                          full_group_path(namespace_ref)
                        else
Severity: Minor
Found in lib/banzai/filter/abstract_reference_filter.rb - About 1 hr to fix

    Method parallelize has 35 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

          def parallelize
            i = 0
            free_right_index = nil
    
            lines = []
    Severity: Minor
    Found in lib/gitlab/diff/parallel_diff.rb - About 1 hr to fix

      Function showPreview has 34 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      MarkdownPreview.prototype.showPreview = function($form) {
        var mdText;
        var markdownVersion;
        var url;
        var preview = $form.find('.js-md-preview');
      Severity: Minor
      Found in app/assets/javascripts/behaviors/preview_markdown.js - About 1 hr to fix

        Function testWrap has 34 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        Raphael.prototype.textWrap = function testWrap(t, width) {
          const content = t.attr('text');
          const abc = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
          t.attr({
            text: abc,
        Severity: Minor
        Found in app/assets/javascripts/network/raphael.js - About 1 hr to fix

          Function constructor has 34 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            constructor({ container, formField }) {
              this.$container = $(container);
              this.formField = formField;
              this.environmentDropdownMap = new WeakMap();
          
          
          Severity: Minor
          Found in app/assets/javascripts/ci_variable_list/ci_variable_list.js - About 1 hr to fix

            Function initLayoutNav has 34 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            export default function initLayoutNav() {
              const contextualSidebar = new ContextualSidebar();
              contextualSidebar.bindEvents();
            
              initFlyOutNav();
            Severity: Minor
            Found in app/assets/javascripts/layout_nav.js - About 1 hr to fix

              Function bindEvents has 34 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                bindEvents() {
                  this.handleFormSubmit = this.handleFormSubmit.bind(this);
                  this.setDropdownWrapper = this.dropdownManager.setDropdown.bind(this.dropdownManager);
                  this.toggleClearSearchButtonWrapper = this.toggleClearSearchButton.bind(this);
                  this.handleInputPlaceholderWrapper = this.handleInputPlaceholder.bind(this);
              Severity: Minor
              Found in app/assets/javascripts/filtered_search/filtered_search_manager.js - About 1 hr to fix

                Function onload has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    faviconImage.onload = () => {
                      const size = 32;
                
                      const canvas = document.createElement('canvas');
                      canvas.width = size;
                Severity: Minor
                Found in app/assets/javascripts/lib/utils/common_utils.js - About 1 hr to fix

                  Method available_services_names has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                    def self.available_services_names
                      service_names = %w[
                        asana
                        assembla
                        bamboo
                  Severity: Minor
                  Found in app/models/service.rb - About 1 hr to fix

                    Method note_json has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                      def note_json(note)
                        attrs = {}
                    
                        if note.persisted?
                          attrs[:valid] = true
                    Severity: Minor
                    Found in app/controllers/concerns/notes_actions.rb - About 1 hr to fix

                      Method instrument has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                            def self.instrument(type, mod, name)
                              return unless Metrics.enabled?
                      
                              name = name.to_sym
                              target = type == :instance ? mod : mod.singleton_class
                      Severity: Minor
                      Found in lib/gitlab/metrics/instrumentation.rb - About 1 hr to fix

                        Method import_cases has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                              def import_cases
                                return unless @cases
                        
                                while bug = @cases.shift
                                  author = user_info(bug['ixPersonOpenedBy'])[:name]
                        Severity: Minor
                        Found in lib/gitlab/fogbugz_import/importer.rb - About 1 hr to fix

                          Function keydown has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                            keydown: function(e) {
                              if (this.destroyed) return;
                          
                              var hiddenCount = 0;
                              var dataHiddenCount = 0;
                          Severity: Minor
                          Found in app/assets/javascripts/droplab/plugins/filter.js - About 1 hr to fix

                            Function initDiffsApp has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            export default function initDiffsApp(store) {
                              return new Vue({
                                el: '#js-diffs-app',
                                name: 'MergeRequestDiffs',
                                components: {
                            Severity: Minor
                            Found in app/assets/javascripts/diffs/index.js - About 1 hr to fix

                              Function generateTreeList has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  (acc, file) => {
                                    const { fileHash, addedLines, removedLines, newFile, deletedFile, newPath } = file;
                                    const split = newPath.split('/');
                              
                                    split.forEach((name, i) => {
                              Severity: Minor
                              Found in app/assets/javascripts/diffs/store/utils.js - About 1 hr to fix

                                Function onChangeInput has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                  onChangeInput(event) {
                                    let target;
                                    let value;
                                
                                    if (event.target === this.branchInput) {
                                Severity: Minor
                                Found in app/assets/javascripts/create_merge_request_dropdown.js - About 1 hr to fix

                                  Function addBinding has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                    addBinding() {
                                      // Edit note link
                                      this.$wrapperEl.on('click', '.js-note-edit', this.showEditForm.bind(this));
                                      this.$wrapperEl.on('click', '.note-edit-cancel', this.cancelEdit);
                                      // Reopen and close actions for Issue/MR combined with note form submit
                                  Severity: Minor
                                  Found in app/assets/javascripts/notes.js - About 1 hr to fix

                                    Method import_issues has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                          def import_issues
                                            return unless repo.issues
                                    
                                            while raw_issue = repo.issues.shift
                                              author  = user_map[raw_issue["author"]["name"]]
                                    Severity: Minor
                                    Found in lib/gitlab/google_code_import/importer.rb - About 1 hr to fix

                                      Function onOptionClick has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                        onOptionClick(e) {
                                          e.preventDefault();
                                      
                                          const queryData = {};
                                      
                                      
                                      Severity: Minor
                                      Found in app/assets/javascripts/groups/groups_filterable_list.js - About 1 hr to fix

                                        Function constructor has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                          constructor(file, head = null) {
                                            this.disposable = new Disposable();
                                            this.file = file;
                                            this.head = head;
                                            this.content = file.content !== '' || file.deleted ? file.content : file.raw;
                                        Severity: Minor
                                        Found in app/assets/javascripts/ide/lib/common/model.js - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language