consul/consul

View on GitHub

Showing 138 of 1,677 total issues

File proposals_spec.rb has 1485 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 1477 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 budget_investments_spec.rb has 1459 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 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 debates_spec.rb has 880 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          require "rails_helper"
          
          describe "Debates" do
            scenario "Disabled with a feature flag" do
              Setting["process.debates"] = nil
          Severity: Major
          Found in spec/system/debates_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 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 user_spec.rb has 565 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 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 528 lines of code (exceeds 250 allowed). Consider refactoring.
                      Open

                      require "rails_helper"
                      
                      describe "Ballots" do
                        let(:user)        { create(:user, :level_two) }
                        let!(:budget)     { create(:budget, :balloting) }
                      Severity: Major
                      Found in spec/system/budgets/ballots_spec.rb - About 1 day to fix

                        Class User has 52 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 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

                            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

                              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 444 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 6 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 428 lines of code (exceeds 250 allowed). Consider refactoring.
                                    Open

                                    require "rails_helper"
                                    
                                    describe "Admin polls", :admin do
                                      scenario "Disabled with a feature flag" do
                                        Setting["process.polls"] = nil
                                    Severity: Minor
                                    Found in spec/system/admin/poll/polls_spec.rb - About 6 hrs to fix

                                      File debates_spec.rb has 427 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 6 hrs to fix

                                        File dashboard_spec.rb has 416 lines of code (exceeds 250 allowed). Consider refactoring.
                                        Open

                                        require "rails_helper"
                                        
                                        describe "Proposal's dashboard" do
                                          let!(:proposal) { create(:proposal, :draft) }
                                        
                                        
                                        Severity: Minor
                                        Found in spec/system/dashboard/dashboard_spec.rb - About 6 hrs to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language