gitlabhq/gitlabhq

View on GitHub

Showing 1,084 of 1,554 total issues

Class Project has 210 methods (exceeds 20 allowed). Consider refactoring.
Open

class Project < ActiveRecord::Base
  include Gitlab::ConfigHelper
  include Gitlab::ShellAdapter
  include Gitlab::VisibilityLevel
  include Gitlab::CurrentSettings
Severity: Major
Found in app/models/project.rb - About 4 days to fix

    File repository.rb has 1398 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 3 days to fix

      File project.rb has 1376 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      require 'carrierwave/orm/activerecord'
      
      class Project < ActiveRecord::Base
        include Gitlab::ConfigHelper
        include Gitlab::ShellAdapter
      Severity: Major
      Found in app/models/project.rb - About 3 days to fix

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

            class Repository
              include Gitlab::Git::RepositoryMirroring
              include Gitlab::Git::Popen
        
              ALLOWED_OBJECT_DIRECTORIES_VARIABLES = %w[
        Severity: Major
        Found in lib/gitlab/git/repository.rb - About 3 days to fix

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

          class User < ActiveRecord::Base
            extend Gitlab::ConfigHelper
            extend Gitlab::CurrentSettings
          
            include Gitlab::ConfigHelper
          Severity: Major
          Found in app/models/user.rb - About 3 days to fix

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

            /* eslint-disable no-restricted-properties, func-names, space-before-function-paren,
            no-var, prefer-rest-params, wrap-iife, no-use-before-define, camelcase,
            no-unused-expressions, quotes, max-len, one-var, one-var-declaration-per-line,
            default-case, prefer-template, consistent-return, no-alert, no-return-assign,
            no-param-reassign, prefer-arrow-callback, no-else-return, comma-dangle, no-new,
            Severity: Major
            Found in app/assets/javascripts/notes.js - About 2 days to fix

              Function UsersSelect has 531 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              function UsersSelect(currentUser, els, options = {}) {
                var $els;
                this.users = this.users.bind(this);
                this.user = this.user.bind(this);
                this.usersPath = "/autocomplete/users.json";
              Severity: Major
              Found in app/assets/javascripts/users_select.js - About 2 days to fix

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

                class Repository
                  REF_MERGE_REQUEST = 'merge-requests'.freeze
                  REF_KEEP_AROUND = 'keep-around'.freeze
                  REF_ENVIRONMENTS = 'environments'.freeze
                
                
                Severity: Major
                Found in app/models/repository.rb - About 2 days to fix

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

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

                    File entities.rb has 944 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 2 days to fix

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

                      class MergeRequest < ActiveRecord::Base
                        include InternalId
                        include Issuable
                        include Noteable
                        include Referable
                      Severity: Major
                      Found in app/models/merge_request.rb - About 2 days to fix

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

                        require 'securerandom'
                        
                        class Repository
                          REF_MERGE_REQUEST = 'merge-requests'.freeze
                          REF_KEEP_AROUND = 'keep-around'.freeze
                        Severity: Major
                        Found in app/models/repository.rb - About 2 days to fix

                          File services.rb has 841 lines of code (exceeds 250 allowed). Consider refactoring.
                          Open

                          module API
                            class Services < Grape::API
                              chat_notification_settings = [
                                {
                                  required: true,
                          Severity: Major
                          Found in lib/api/services.rb - About 2 days to fix

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

                            /* eslint-disable func-names, no-underscore-dangle, space-before-function-paren, no-var, one-var, one-var-declaration-per-line, prefer-rest-params, max-len, vars-on-top, wrap-iife, no-unused-vars, quotes, no-shadow, no-cond-assign, prefer-arrow-callback, no-return-assign, no-else-return, camelcase, comma-dangle, no-lonely-if, guard-for-in, no-restricted-syntax, consistent-return, prefer-template, no-param-reassign, no-loop-func, no-mixed-operators */
                            /* global fuzzaldrinPlus */
                            import _ from 'underscore';
                            import fuzzaldrinPlus from 'fuzzaldrin-plus';
                            import { visitUrl } from './lib/utils/url_utility';
                            Severity: Major
                            Found in app/assets/javascripts/gl_dropdown.js - About 1 day to fix

                              Function constructor has 361 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 1 day to fix

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

                                class MergeRequest < ActiveRecord::Base
                                  include InternalId
                                  include Issuable
                                  include Noteable
                                  include Referable
                                Severity: Major
                                Found in app/models/merge_request.rb - About 1 day to fix

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

                                    class Build < CommitStatus
                                      prepend ArtifactMigratable
                                      include TokenAuthenticatable
                                      include AfterCommitQueue
                                      include Presentable
                                  Severity: Major
                                  Found in app/models/ci/build.rb - About 1 day to fix

                                    File services.rb has 656 lines of code (exceeds 250 allowed). Consider refactoring.
                                    Open

                                    module API
                                      module V3
                                        class Services < Grape::API
                                          services = {
                                            'asana' => [
                                    Severity: Major
                                    Found in lib/api/v3/services.rb - About 1 day to fix

                                      File users_select.js has 604 lines of code (exceeds 250 allowed). Consider refactoring.
                                      Open

                                      /* eslint-disable func-names, space-before-function-paren, one-var, no-var, prefer-rest-params, wrap-iife, quotes, max-len, one-var-declaration-per-line, vars-on-top, prefer-arrow-callback, consistent-return, comma-dangle, object-shorthand, no-shadow, no-unused-vars, no-else-return, no-self-compare, prefer-template, no-unused-expressions, no-lonely-if, yoda, prefer-spread, no-void, camelcase, no-param-reassign */
                                      /* global Issuable */
                                      /* global emitSidebarEvent */
                                      import _ from 'underscore';
                                      
                                      
                                      Severity: Major
                                      Found in app/assets/javascripts/users_select.js - About 1 day to fix

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

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