AyuntamientoMadrid/participacion

View on GitHub

Showing 143 of 2,535 total issues

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 admin.rb has 283 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

                    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

                      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 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 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

                                  Class Debate has 23 methods (exceeds 20 allowed). Consider refactoring.
                                  Open

                                  class Debate < ApplicationRecord
                                    include Flaggable
                                    include Taggable
                                    include Conflictable
                                    include Measurable
                                  Severity: Minor
                                  Found in app/models/debate.rb - About 2 hrs to fix

                                    File heading_spec.rb has 267 lines of code (exceeds 250 allowed). Consider refactoring.
                                    Open

                                    require "rails_helper"
                                    
                                    describe Budget::Heading do
                                      let(:budget) { create(:budget) }
                                      let(:group) { create(:budget_group, budget: budget) }
                                    Severity: Minor
                                    Found in spec/models/budget/heading_spec.rb - About 2 hrs to fix

                                      Class Comment has 22 methods (exceeds 20 allowed). Consider refactoring.
                                      Open

                                      class Comment < ApplicationRecord
                                        include Flaggable
                                        include HasPublicAuthor
                                        include Graphqlable
                                        include Notifiable
                                      Severity: Minor
                                      Found in app/models/comment.rb - About 2 hrs to fix

                                        File dashboard_graphs.js has 255 lines of code (exceeds 250 allowed). Consider refactoring.
                                        Open

                                        //= require d3
                                        //= require c3
                                        //= require c3ext
                                        
                                        (function() {
                                        Severity: Minor
                                        Found in app/assets/javascripts/dashboard_graphs.js - About 2 hrs to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language