consul/consul

View on GitHub

Showing 140 of 1,691 total issues

File budget_investments_spec.rb has 1443 lines of code (exceeds 250 allowed). Consider refactoring.
Open

require "rails_helper"

describe "Admin budget investments", :admin do
  let(:budget) { create(:budget) }
  let(:administrator) do
Severity: Major
Found in spec/system/admin/budget_investments_spec.rb - About 3 days to fix

    File proposals_spec.rb has 1284 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    require "rails_helper"
    
    describe "Proposals" do
      it_behaves_like "milestoneable", :proposal
    
    
    Severity: Major
    Found in spec/system/proposals_spec.rb - About 3 days to fix

      File investments_spec.rb has 1188 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      require "rails_helper"
      require "sessions_helper"
      
      describe "Budget Investments" do
        let(:author)  { create(:user, :level_two, username: "Isabel") }
      Severity: Major
      Found in spec/system/budgets/investments_spec.rb - About 3 days to fix

        File investment_spec.rb has 1018 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        require "rails_helper"
        
        describe Budget::Investment do
          let(:investment) { build(:budget_investment) }
        
        
        Severity: Major
        Found in spec/models/budget/investment_spec.rb - About 2 days to fix

          File topics_spec.rb has 815 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          require "rails_helper"
          
          describe "Commenting topics from proposals" do
            let(:user)     { create :user }
            let(:proposal) { create :proposal }
          Severity: Major
          Found in spec/system/comments/topics_spec.rb - About 1 day to fix

            File proposal_spec.rb has 804 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            require "rails_helper"
            
            describe Proposal do
              let(:proposal) { build(:proposal) }
            
            
            Severity: Major
            Found in spec/models/proposal_spec.rb - About 1 day to fix

              File debates_spec.rb has 675 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              require "rails_helper"
              
              describe "Debates" do
                context "Concerns" do
                  it_behaves_like "notifiable in-app", :debate
              Severity: Major
              Found in spec/system/debates_spec.rb - About 1 day to fix

                File user_spec.rb has 630 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                require "rails_helper"
                
                describe User do
                  describe "#headings_voted_within_group" do
                    it "returns the headings voted by a user" do
                Severity: Major
                Found in spec/models/user_spec.rb - About 1 day to fix

                  File debate_spec.rb has 586 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  require "rails_helper"
                  
                  describe Debate do
                    let(:debate) { build(:debate) }
                  
                  
                  Severity: Major
                  Found in spec/models/debate_spec.rb - About 1 day to fix

                    File legislation_annotations_spec.rb has 558 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    require "rails_helper"
                    
                    describe "Commenting legislation questions" do
                      let(:user) { create :user }
                      let(:legislation_annotation) { create :legislation_annotation, author: user }
                    Severity: Major
                    Found in spec/system/comments/legislation_annotations_spec.rb - About 1 day to fix

                      File ballots_spec.rb has 493 lines of code (exceeds 250 allowed). Consider refactoring.
                      Open

                      require "rails_helper"
                      require "sessions_helper"
                      
                      describe "Ballots" do
                        let(:user)        { create(:user, :level_two) }
                      Severity: Minor
                      Found in spec/system/budgets/ballots_spec.rb - About 7 hrs to fix

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

                        class User < ApplicationRecord
                          include Verification
                        
                          devise :database_authenticatable, :registerable, :confirmable, :recoverable, :rememberable,
                                 :trackable, :validatable, :omniauthable, :password_expirable, :secure_validatable,
                        Severity: Major
                        Found in app/models/user.rb - About 7 hrs to fix

                          Class Investment has 52 methods (exceeds 20 allowed). Consider refactoring.
                          Open

                            class Investment < ApplicationRecord
                              SORTING_OPTIONS = { id: "id", supports: "cached_votes_up" }.freeze
                          
                              include Rails.application.routes.url_helpers
                              include Measurable
                          Severity: Major
                          Found in app/models/budget/investment.rb - About 7 hrs to fix

                            Class MenuComponent has 52 methods (exceeds 20 allowed). Consider refactoring.
                            Open

                            class Admin::MenuComponent < ApplicationComponent
                              include LinkListHelper
                            
                              private
                            
                            
                            Severity: Major
                            Found in app/components/admin/menu_component.rb - About 7 hrs to fix

                              File debates_spec.rb has 464 lines of code (exceeds 250 allowed). Consider refactoring.
                              Open

                              require "rails_helper"
                              
                              describe "Commenting debates" do
                                let(:user)   { create :user }
                                let(:debate) { create :debate }
                              Severity: Minor
                              Found in spec/system/comments/debates_spec.rb - About 7 hrs to fix

                                File graphql_spec.rb has 464 lines of code (exceeds 250 allowed). Consider refactoring.
                                Open

                                require "rails_helper"
                                
                                api_types  = GraphQL::ApiTypesCreator.create
                                query_type = GraphQL::QueryTypeCreator.create(api_types)
                                ConsulSchema = GraphQL::Schema.define do
                                Severity: Minor
                                Found in spec/lib/graphql_spec.rb - About 7 hrs to fix

                                  File users_auth_spec.rb has 457 lines of code (exceeds 250 allowed). Consider refactoring.
                                  Open

                                  require "rails_helper"
                                  
                                  describe "Users" do
                                    context "Regular authentication" do
                                      context "Sign up" do
                                  Severity: Minor
                                  Found in spec/system/users_auth_spec.rb - About 7 hrs to fix

                                    File budget_investments_spec.rb has 439 lines of code (exceeds 250 allowed). Consider refactoring.
                                    Open

                                    require "rails_helper"
                                    
                                    describe "Commenting Budget::Investments" do
                                      let(:user) { create :user }
                                      let(:investment) { create :budget_investment }
                                    Severity: Minor
                                    Found in spec/system/comments/budget_investments_spec.rb - About 6 hrs to fix

                                      File polls_spec.rb has 425 lines of code (exceeds 250 allowed). Consider refactoring.
                                      Open

                                      require "rails_helper"
                                      
                                      describe "Admin polls", :admin do
                                        scenario "Index empty" do
                                          visit admin_root_path
                                      Severity: Minor
                                      Found in spec/system/admin/poll/polls_spec.rb - About 6 hrs to fix

                                        File legislation_questions_spec.rb has 412 lines of code (exceeds 250 allowed). Consider refactoring.
                                        Open

                                        require "rails_helper"
                                        
                                        describe "Commenting legislation questions" do
                                          let(:user) { create :user, :level_two }
                                          let(:process) { create :legislation_process, :in_debate_phase }
                                        Severity: Minor
                                        Found in spec/system/comments/legislation_questions_spec.rb - About 5 hrs to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language