AyuntamientoMadrid/participacion

View on GitHub

Showing 150 of 2,528 total issues

File investment.rb has 333 lines of code (exceeds 250 allowed). Consider refactoring.
Open

class Budget
  class Investment < ApplicationRecord
    SORTING_OPTIONS = { id: "id", supports: "cached_votes_up" }.freeze

    include Measurable
Severity: Minor
Found in app/models/budget/investment.rb - About 4 hrs to fix

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

        def initialize(user)
          merge Abilities::Everyone.new(user)
    
          can [:read, :update], User, id: user.id
    
    
    Severity: Major
    Found in app/models/abilities/common.rb - About 3 hrs to fix

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

      require "rails_helper"
      
      describe "Polls" do
        context "Concerns" do
          it_behaves_like "notifiable in-app", :poll
      Severity: Minor
      Found in spec/system/polls/polls_spec.rb - About 3 hrs to fix

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

        require "rails_helper"
        
        describe "Admin collaborative legislation", :admin do
          it_behaves_like "admin_milestoneable",
                          :legislation_process,
        Severity: Minor
        Found in spec/system/admin/legislation/processes_spec.rb - About 3 hrs to fix

          File proposal_notifications_spec.rb has 300 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          require "rails_helper"
          
          describe "Proposal Notifications" do
            scenario "Send a notification" do
              author = create(:user, :with_proposal)
          Severity: Minor
          Found in spec/system/proposal_notifications_spec.rb - About 3 hrs to fix

            File process_spec.rb has 298 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            require "rails_helper"
            
            describe Legislation::Process do
              let(:process) { create(:legislation_process) }
            
            
            Severity: Minor
            Found in spec/models/legislation/process_spec.rb - About 3 hrs to fix

              File common_spec.rb has 293 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              require "rails_helper"
              require "cancan/matchers"
              
              describe Abilities::Common do
                subject(:ability) { Ability.new(user) }
              Severity: Minor
              Found in spec/models/abilities/common_spec.rb - About 3 hrs to fix

                Function editorConfig has 73 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                CKEDITOR.editorConfig = function( config )
                {
                
                  config.filebrowserImageBrowseLinkUrl = "/ckeditor/pictures";
                  config.filebrowserImageBrowseUrl = "/ckeditor/pictures";
                Severity: Major
                Found in app/assets/javascripts/ckeditor/config.js - About 2 hrs to fix

                  File system_emails_spec.rb has 287 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  require "rails_helper"
                  
                  describe "System Emails" do
                    let(:admin) { create(:administrator) }
                  
                  
                  Severity: Minor
                  Found in spec/system/admin/system_emails_spec.rb - About 2 hrs to fix

                    File advanced_search_spec.rb has 286 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    require "rails_helper"
                    
                    describe "Advanced search" do
                      let(:budget)  { create(:budget, name: "Big Budget") }
                      let(:heading) { create(:budget_heading, budget: budget, name: "More hospitals") }
                    Severity: Minor
                    Found in spec/system/advanced_search_spec.rb - About 2 hrs to fix

                      Function draw has 71 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                        ProposalGraph.prototype.draw = function() {
                          var colors = {},
                            maximumValue = this.maximumValue === 0 ? this.proposalSuccess : Math.round(this.maximumValue * 1.10);
                      
                          this.formatXColumnValues();
                      Severity: Major
                      Found in app/assets/javascripts/dashboard_graphs.js - About 2 hrs to fix

                        Class ProposalsController has 25 methods (exceeds 20 allowed). Consider refactoring.
                        Open

                        class ProposalsController < ApplicationController
                          include FeatureFlags
                          include CommentableActions
                          include FlagActions
                          include ImageAttributes
                        Severity: Minor
                        Found in app/controllers/proposals_controller.rb - About 2 hrs to fix

                          File settings_spec.rb has 281 lines of code (exceeds 250 allowed). Consider refactoring.
                          Open

                          require "rails_helper"
                          
                          describe "Admin settings", :admin do
                            scenario "Index" do
                              visit admin_settings_path
                          Severity: Minor
                          Found in spec/system/admin/settings_spec.rb - About 2 hrs to fix

                            File user_segments_spec.rb has 280 lines of code (exceeds 250 allowed). Consider refactoring.
                            Open

                            require "rails_helper"
                            
                            describe UserSegments do
                              let(:user1) { create(:user) }
                              let(:user2) { create(:user) }
                            Severity: Minor
                            Found in spec/lib/user_segments_spec.rb - About 2 hrs to fix

                              File admin.rb has 280 lines of code (exceeds 250 allowed). Consider refactoring.
                              Open

                              namespace :admin do
                                root to: "dashboard#index"
                                resources :organizations, only: :index do
                                  get :search, on: :collection
                                  member do
                              Severity: Minor
                              Found in config/routes/admin.rb - About 2 hrs to fix

                                Function initializeMap has 68 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    initializeMap: function(element) {
                                      var createMarker, editable, investmentsMarkers, map, marker, markerClustering,
                                        markerData, markerIcon, markers, moveOrPlaceMarker, removeMarker, removeMarkerSelector;
                                      App.Map.cleanInvestmentCoordinates(element);
                                      removeMarkerSelector = $(element).data("marker-remove-selector");
                                Severity: Major
                                Found in app/assets/javascripts/map.js - About 2 hrs to fix

                                  File votes_spec.rb has 278 lines of code (exceeds 250 allowed). Consider refactoring.
                                  Open

                                  require "rails_helper"
                                  
                                  describe "Votes" do
                                    let!(:verified)   { create(:user, verified_at: Time.current) }
                                    let!(:unverified) { create(:user) }
                                  Severity: Minor
                                  Found in spec/system/votes_spec.rb - About 2 hrs to fix

                                    File activity_spec.rb has 277 lines of code (exceeds 250 allowed). Consider refactoring.
                                    Open

                                    require "rails_helper"
                                    
                                    describe "Admin activity" do
                                      let(:admin) { create(:administrator) }
                                    
                                    
                                    Severity: Minor
                                    Found in spec/system/admin/activity_spec.rb - About 2 hrs to fix

                                      File action_spec.rb has 272 lines of code (exceeds 250 allowed). Consider refactoring.
                                      Open

                                      require "rails_helper"
                                      
                                      describe Dashboard::Action do
                                        subject do
                                          build(:dashboard_action,
                                      Severity: Minor
                                      Found in spec/models/dashboard/action_spec.rb - About 2 hrs to fix

                                        File stats_spec.rb has 271 lines of code (exceeds 250 allowed). Consider refactoring.
                                        Open

                                        require "rails_helper"
                                        
                                        describe "Stats", :admin do
                                          context "Summary" do
                                            scenario "General" do
                                        Severity: Minor
                                        Found in spec/system/admin/stats_spec.rb - About 2 hrs to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language