AyuntamientoMadrid/participacion

View on GitHub

Showing 150 of 2,528 total issues

Class MachineLearning has 45 methods (exceeds 20 allowed). Consider refactoring.
Open

class MachineLearning
  attr_reader :user, :script, :previous_modified_date
  attr_accessor :job

  SCRIPTS_FOLDER = Rails.root.join("public", "machine_learning", "scripts").freeze
Severity: Minor
Found in app/models/machine_learning.rb - About 6 hrs to fix

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

    require "rails_helper"
    
    describe "Budget Investments" do
      let(:manager) { create(:manager) }
      let(:budget)  { create(:budget, :selecting, name: "2033", slug: "budget_slug") }
    Severity: Minor
    Found in spec/system/management/budget_investments_spec.rb - About 6 hrs to fix

      File machine_learning.rb has 414 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      class MachineLearning
        attr_reader :user, :script, :previous_modified_date
        attr_accessor :job
      
        SCRIPTS_FOLDER = Rails.root.join("public", "machine_learning", "scripts").freeze
      Severity: Minor
      Found in app/models/machine_learning.rb - About 5 hrs to fix

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

        require "rails_helper"
        
        describe "Proposal's dashboard" do
          let(:proposal) { create(:proposal, :draft) }
          before { login_as(proposal.author) }
        Severity: Minor
        Found in spec/system/dashboard/dashboard_spec.rb - About 5 hrs to fix

          File emails_spec.rb has 410 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          require "rails_helper"
          
          describe "Emails" do
            before do
              reset_mailer
          Severity: Minor
          Found in spec/system/emails_spec.rb - About 5 hrs to fix

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

            require "rails_helper"
            
            describe "Valuation budget investments" do
              let(:budget) { create(:budget, :valuating) }
              let(:valuator) do
            Severity: Minor
            Found in spec/system/valuation/budget_investments_spec.rb - About 5 hrs to fix

              File translatable_spec.rb has 384 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              require "rails_helper"
              
              describe "Admin edit translatable records", :admin do
                before do
                  translatable.main_link_url = "https://consuldemocracy.org" if translatable.is_a?(Budget::Phase)
              Severity: Minor
              Found in spec/system/admin/translatable_spec.rb - About 5 hrs to fix

                Class Budget has 39 methods (exceeds 20 allowed). Consider refactoring.
                Open

                class Budget < ApplicationRecord
                  include Measurable
                  include Sluggable
                  include StatsVersionable
                  include Reportable
                Severity: Minor
                Found in app/models/budget.rb - About 5 hrs to fix

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

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

                    File budgets_spec.rb has 370 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    require "rails_helper"
                    
                    describe "Admin budgets", :admin do
                      it_behaves_like "nested imageable",
                                      "budget",
                    Severity: Minor
                    Found in spec/system/admin/budgets_spec.rb - About 4 hrs to fix

                      File relations_spec.rb has 367 lines of code (exceeds 250 allowed). Consider refactoring.
                      Open

                      require "rails_helper"
                      
                      describe "SDG Relations" do
                        before do
                          login_as(create(:administrator).user)
                      Severity: Minor
                      Found in spec/system/sdg_management/relations_spec.rb - About 4 hrs to fix

                        Class Poll has 36 methods (exceeds 20 allowed). Consider refactoring.
                        Open

                        class Poll < ApplicationRecord
                          require_dependency "poll/answer"
                        
                          include Imageable
                          acts_as_paranoid column: :hidden_at
                        Severity: Minor
                        Found in app/models/poll.rb - About 4 hrs to fix

                          File users_spec.rb has 361 lines of code (exceeds 250 allowed). Consider refactoring.
                          Open

                          require "rails_helper"
                          
                          describe "Users" do
                            describe "Show (public page)" do
                              let(:user) { create(:user) }
                          Severity: Minor
                          Found in spec/system/users_spec.rb - About 4 hrs to fix

                            File tenant_spec.rb has 359 lines of code (exceeds 250 allowed). Consider refactoring.
                            Open

                            require "rails_helper"
                            require "active_storage/service/disk_service"
                            
                            describe Tenant do
                              describe ".resolve_host" do
                            Severity: Minor
                            Found in spec/models/tenant_spec.rb - About 4 hrs to fix

                              Class Proposal has 35 methods (exceeds 20 allowed). Consider refactoring.
                              Open

                              class Proposal < ApplicationRecord
                                include Flaggable
                                include Taggable
                                include Conflictable
                                include Measurable
                              Severity: Minor
                              Found in app/models/proposal.rb - About 4 hrs to fix

                                Method defaults has 112 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    def defaults
                                      {
                                        "feature.featured_proposals": nil,
                                        "feature.facebook_login": true,
                                        "feature.google_login": true,
                                Severity: Major
                                Found in app/models/setting.rb - About 4 hrs to fix

                                  File draft_versions_spec.rb has 350 lines of code (exceeds 250 allowed). Consider refactoring.
                                  Open

                                  require "rails_helper"
                                  
                                  describe "Legislation Draft Versions" do
                                    let(:user) { create(:user) }
                                    let(:administrator) do
                                  Severity: Minor
                                  Found in spec/system/legislation/draft_versions_spec.rb - About 4 hrs to fix

                                    File budgets_spec.rb has 349 lines of code (exceeds 250 allowed). Consider refactoring.
                                    Open

                                    require "rails_helper"
                                    
                                    describe "Budgets" do
                                      let(:budget)             { create(:budget) }
                                      let(:level_two_user)     { create(:user, :level_two) }
                                    Severity: Minor
                                    Found in spec/system/budgets/budgets_spec.rb - About 4 hrs to fix

                                      Method initialize has 106 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          def initialize(user)
                                            merge Abilities::Moderation.new(user)
                                            merge Abilities::SDG::Manager.new(user)
                                      
                                            can :restore, Comment
                                      Severity: Major
                                      Found in app/models/abilities/administrator.rb - About 4 hrs to fix

                                        File processes_spec.rb has 340 lines of code (exceeds 250 allowed). Consider refactoring.
                                        Open

                                        require "rails_helper"
                                        
                                        describe "Legislation" do
                                          let!(:administrator) { create(:administrator).user }
                                        
                                        
                                        Severity: Minor
                                        Found in spec/system/legislation/processes_spec.rb - About 4 hrs to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language