consul/consul

View on GitHub

Showing 157 of 1,379 total issues

File budget_investments_spec.rb has 1432 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 investments_spec.rb has 1351 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 proposals_spec.rb has 1279 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 investment_spec.rb has 1054 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 829 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 817 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 user_spec.rb has 749 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 debates_spec.rb has 630 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

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

                  class Admin::MenuComponent < ApplicationComponent
                    include LinkListHelper
                    use_helpers :can?
                  
                    def links
                  Severity: Major
                  Found in app/components/admin/menu_component.rb - About 1 day to fix

                    File debate_spec.rb has 593 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 users_auth_spec.rb has 583 lines of code (exceeds 250 allowed). Consider refactoring.
                      Open

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

                        File ballots_spec.rb has 530 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: Major
                        Found in spec/system/budgets/ballots_spec.rb - About 1 day to fix

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

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

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

                            class User < ApplicationRecord
                              include Verification
                              attribute :registering_from_web, default: false
                            
                              devise :database_authenticatable, :registerable, :confirmable, :recoverable, :rememberable,
                            Severity: Major
                            Found in app/models/user.rb - About 1 day to fix

                              File menu_component.rb has 494 lines of code (exceeds 250 allowed). Consider refactoring.
                              Open

                              class Admin::MenuComponent < ApplicationComponent
                                include LinkListHelper
                                use_helpers :can?
                              
                                def links
                              Severity: Minor
                              Found in app/components/admin/menu_component.rb - About 7 hrs to fix

                                File machine_learning_spec.rb has 481 lines of code (exceeds 250 allowed). Consider refactoring.
                                Open

                                require "rails_helper"
                                
                                describe MachineLearning do
                                  def full_sanitizer(string)
                                    ActionView::Base.full_sanitizer.sanitize(string)
                                Severity: Minor
                                Found in spec/models/machine_learning_spec.rb - About 7 hrs to fix

                                  File debates_spec.rb has 478 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 468 lines of code (exceeds 250 allowed). Consider refactoring.
                                    Open

                                    require "rails_helper"
                                    
                                    def execute(query_string, context = {}, variables = {})
                                      ConsulSchema.execute(query_string, context: context, variables: variables)
                                    end
                                    Severity: Minor
                                    Found in spec/lib/graphql_spec.rb - About 7 hrs to fix

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

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

                                        File poll_spec.rb has 460 lines of code (exceeds 250 allowed). Consider refactoring.
                                        Open

                                        require "rails_helper"
                                        
                                        describe Poll do
                                          let(:poll) { build(:poll, :future) }
                                        
                                        
                                        Severity: Minor
                                        Found in spec/models/poll/poll_spec.rb - About 7 hrs to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language