gitlabhq/gitlabhq

View on GitHub

Showing 1,432 of 2,076 total issues

Class User has 185 methods (exceeds 20 allowed). Consider refactoring.
Open

class User < ApplicationRecord
  extend Gitlab::ConfigHelper

  include Gitlab::ConfigHelper
  include Gitlab::SQL::Pattern
Severity: Major
Found in app/models/user.rb - About 3 days to fix

    File notes.js has 1358 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /* eslint-disable no-restricted-properties, func-names, no-var, camelcase,
    no-unused-expressions, one-var, default-case,
    prefer-template, consistent-return, no-alert, no-return-assign,
    no-param-reassign, prefer-arrow-callback, no-else-return, vars-on-top,
    no-unused-vars, no-shadow, no-useless-escape, class-methods-use-this */
    Severity: Major
    Found in app/assets/javascripts/notes.js - About 3 days to fix

      File entities.rb has 1351 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      module API
        module Entities
          class WikiPageBasic < Grape::Entity
            expose :format
            expose :slug
      Severity: Major
      Found in lib/api/entities.rb - About 3 days to fix

        Class MergeRequest has 160 methods (exceeds 20 allowed). Consider refactoring.
        Open

        class MergeRequest < ApplicationRecord
          include AtomicInternalId
          include IidRoutes
          include Issuable
          include Noteable
        Severity: Major
        Found in app/models/merge_request.rb - About 3 days to fix

          File user.rb has 1128 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          require 'carrierwave/orm/activerecord'
          
          class User < ApplicationRecord
            extend Gitlab::ConfigHelper
          
          
          Severity: Major
          Found in app/models/user.rb - About 2 days to fix

            Method services has 564 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                  def self.services
                    {
                      'asana' => [
                        {
                          required: true,
            Severity: Major
            Found in lib/api/helpers/services_helpers.rb - About 2 days to fix

              File merge_request.rb has 1031 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              class MergeRequest < ApplicationRecord
                include AtomicInternalId
                include IidRoutes
                include Issuable
                include Noteable
              Severity: Major
              Found in app/models/merge_request.rb - About 2 days to fix

                Class Repository has 120 methods (exceeds 20 allowed). Consider refactoring.
                Open

                    class Repository
                      include Gitlab::Git::RepositoryMirroring
                      include Gitlab::Git::WrapsGitalyErrors
                      include Gitlab::EncodingHelper
                      include Gitlab::Utils::StrongMemoize
                Severity: Major
                Found in lib/gitlab/git/repository.rb - About 2 days to fix

                  File gl_dropdown.js has 928 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  /* eslint-disable func-names, no-underscore-dangle, no-var, one-var, vars-on-top, no-unused-vars, no-shadow, no-cond-assign, prefer-arrow-callback, no-return-assign, no-else-return, camelcase, no-lonely-if, guard-for-in, no-restricted-syntax, consistent-return, prefer-template, no-param-reassign, no-loop-func */
                  /* global fuzzaldrinPlus */
                  
                  import $ from 'jquery';
                  import _ from 'underscore';
                  Severity: Major
                  Found in app/assets/javascripts/gl_dropdown.js - About 2 days to fix

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

                      constructor(els, options = {}) {
                        var _this, $els;
                        _this = this;
                    
                        $els = $(els);
                    Severity: Major
                    Found in app/assets/javascripts/labels_select.js - About 2 days to fix

                      Class Build has 102 methods (exceeds 20 allowed). Consider refactoring.
                      Open

                        class Build < CommitStatus
                          include Ci::Processable
                          include Ci::Metadatable
                          include Ci::Contextable
                          include Ci::PipelineDelegator
                      Severity: Major
                      Found in app/models/ci/build.rb - About 1 day to fix

                        File services_helpers.rb has 755 lines of code (exceeds 250 allowed). Consider refactoring.
                        Open

                        module API
                          module Helpers
                            # Helpers module for API::Services
                            #
                            # The data structures inside this model are returned using class methods,
                        Severity: Major
                        Found in lib/api/helpers/services_helpers.rb - About 1 day to fix

                          File repository.rb has 740 lines of code (exceeds 250 allowed). Consider refactoring.
                          Open

                          require 'tempfile'
                          require 'forwardable'
                          require "rubygems/package"
                          
                          module Gitlab
                          Severity: Major
                          Found in lib/gitlab/git/repository.rb - About 1 day to fix

                            Class Pipeline has 86 methods (exceeds 20 allowed). Consider refactoring.
                            Open

                              class Pipeline < ApplicationRecord
                                extend Gitlab::Ci::Model
                                include HasStatus
                                include Importable
                                include AfterCommitQueue
                            Severity: Major
                            Found in app/models/ci/pipeline.rb - About 1 day to fix

                              Class Converter has 77 methods (exceeds 20 allowed). Consider refactoring.
                              Open

                                    class Converter
                                      def on_0(_) reset                              end
                              
                                      def on_1(_) enable(STYLE_SWITCHES[:bold])      end
                              
                              
                              Severity: Major
                              Found in lib/gitlab/ci/ansi2html.rb - About 1 day to fix

                                File users.rb has 645 lines of code (exceeds 250 allowed). Consider refactoring.
                                Open

                                module API
                                  class Users < Grape::API
                                    include PaginationParams
                                    include APIGuard
                                    include Helpers::CustomAttributes
                                Severity: Major
                                Found in lib/api/users.rb - About 1 day to fix

                                  Notes has 74 functions (exceeds 20 allowed). Consider refactoring.
                                  Open

                                  export default class Notes {
                                    static initialize(notes_url, note_ids, last_fetched_at, view, enableGFM) {
                                      if (!this.instance) {
                                        this.instance = new Notes(notes_url, note_ids, last_fetched_at, view, enableGFM);
                                      }
                                  Severity: Major
                                  Found in app/assets/javascripts/notes.js - About 1 day to fix

                                    File build.rb has 625 lines of code (exceeds 250 allowed). Consider refactoring.
                                    Open

                                    module Ci
                                      class Build < CommitStatus
                                        include Ci::Processable
                                        include Ci::Metadatable
                                        include Ci::Contextable
                                    Severity: Major
                                    Found in app/models/ci/build.rb - About 1 day to fix

                                      File pipeline.rb has 624 lines of code (exceeds 250 allowed). Consider refactoring.
                                      Open

                                      module Ci
                                        class Pipeline < ApplicationRecord
                                          extend Gitlab::Ci::Model
                                          include HasStatus
                                          include Importable
                                      Severity: Major
                                      Found in app/models/ci/pipeline.rb - About 1 day to fix

                                        Class Commit has 69 methods (exceeds 20 allowed). Consider refactoring.
                                        Open

                                        class Commit
                                          extend ActiveModel::Naming
                                          extend Gitlab::Cache::RequestCache
                                        
                                          include ActiveModel::Conversion
                                        Severity: Major
                                        Found in app/models/commit.rb - About 1 day to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language