mysociety/alaveteli

View on GitHub

Showing 465 of 1,294 total issues

Function Plot has 1911 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    function Plot(placeholder, data_, options_, plugins) {
        // data is on the form:
        //   [ series1, series2 ... ]
        // where series is either just the data as [ [x1, y1], [x2, y2], ... ]
        // or { data: [ [x1, y1], [x2, y2], ... ], label: "some label", ... }
Severity: Major
Found in app/assets/javascripts/jquery.flot.js - About 1 wk to fix

    File info_request_spec.rb has 3346 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
    
    describe InfoRequest do
    
      describe 'creating a new request' do
    Severity: Major
    Found in spec/models/info_request_spec.rb - About 1 wk to fix

      File selectize.js has 2497 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      /**
       * sifter.js
       * Copyright (c) 2013 Brian Reavis & contributors
       *
       * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this
      Severity: Major
      Found in app/assets/javascripts/alaveteli_pro/selectize.js - About 6 days to fix

        File request_controller_spec.rb has 2447 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
        
        describe RequestController, "when listing recent requests" do
          before(:each) do
            load_raw_emails_data
        Severity: Major
        Found in spec/controllers/request_controller_spec.rb - About 6 days to fix

          File jquery.flot.js has 2154 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          /* Javascript plotting library for jQuery, version 0.8.2-alpha.
          
          Copyright (c) 2007-2013 IOLA and Ole Laursen.
          Licensed under the MIT license.
          
          
          Severity: Major
          Found in app/assets/javascripts/jquery.flot.js - About 5 days to fix

            File public_body_spec.rb has 1510 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
            
            describe PublicBody do
            
              describe <<-EOF.squish do
            Severity: Major
            Found in spec/models/public_body_spec.rb - About 4 days to fix

              File outgoing_message_spec.rb has 1419 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
              
              describe OutgoingMessage do
              
                describe '.fill_in_salutation' do
              Severity: Major
              Found in spec/models/outgoing_message_spec.rb - About 3 days to fix

                File info_request.rb has 1335 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                require 'digest/sha1'
                require 'fileutils'
                
                class InfoRequest < ActiveRecord::Base
                  include AdminColumn
                Severity: Major
                Found in app/models/info_request.rb - About 3 days to fix

                  Class InfoRequest has 137 methods (exceeds 20 allowed). Consider refactoring.
                  Open

                  class InfoRequest < ActiveRecord::Base
                    include AdminColumn
                    include Rails.application.routes.url_helpers
                    include AlaveteliPro::RequestSummaries
                    include AlaveteliFeatures::Helpers
                  Severity: Major
                  Found in app/models/info_request.rb - About 2 days to fix

                    File notification_mailer_spec.rb has 941 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    require 'spec_helper'
                    
                    describe NotificationMailer do
                      describe '#daily_summary' do
                        let!(:user) { FactoryGirl.create(:user) }
                    Severity: Major
                    Found in spec/mailers/notification_mailer_spec.rb - About 2 days to fix

                      File request_controller.rb has 936 lines of code (exceeds 250 allowed). Consider refactoring.
                      Open

                      require 'zip/zip'
                      require 'open-uri'
                      
                      class RequestController < ApplicationController
                        before_filter :check_read_only, :only => [ :new, :describe_state, :upload_response ]
                      Severity: Major
                      Found in app/controllers/request_controller.rb - About 2 days to fix

                        File user_controller_spec.rb has 867 lines of code (exceeds 250 allowed). Consider refactoring.
                        Open

                        require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
                        
                        describe UserController do
                        
                          describe 'GET show' do
                        Severity: Major
                        Found in spec/controllers/user_controller_spec.rb - About 2 days to fix

                          File ability_spec.rb has 843 lines of code (exceeds 250 allowed). Consider refactoring.
                          Open

                          require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
                          require "cancan/matchers"
                          
                          shared_examples_for "a class with message prominence" do
                            let(:admin_ability) { Ability.new(FactoryGirl.create(:admin_user)) }
                          Severity: Major
                          Found in spec/models/ability_spec.rb - About 2 days to fix

                            File admin_censor_rule_controller_spec.rb has 767 lines of code (exceeds 250 allowed). Consider refactoring.
                            Open

                            require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
                            
                            describe AdminCensorRuleController do
                              before(:each) { basic_auth_login(@request) }
                            
                            
                            Severity: Major
                            Found in spec/controllers/admin_censor_rule_controller_spec.rb - About 1 day to fix

                              File acts_as_xapian.rb has 708 lines of code (exceeds 250 allowed). Consider refactoring.
                              Open

                              begin
                                require 'xapian'
                                $acts_as_xapian_bindings_available = true
                              rescue LoadError
                                STDERR.puts "acts_as_xapian: No Ruby bindings for Xapian installed"
                              Severity: Major
                              Found in lib/acts_as_xapian/acts_as_xapian.rb - About 1 day to fix

                                File request_mailer_spec.rb has 694 lines of code (exceeds 250 allowed). Consider refactoring.
                                Open

                                require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
                                
                                describe RequestMailer do
                                
                                  describe "when receiving incoming mail" do
                                Severity: Major
                                Found in spec/mailers/request_mailer_spec.rb - About 1 day to fix

                                  File admin_public_body_controller_spec.rb has 684 lines of code (exceeds 250 allowed). Consider refactoring.
                                  Open

                                  require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
                                  
                                  describe AdminPublicBodyController do
                                  
                                    describe 'GET #index' do
                                  Severity: Major
                                  Found in spec/controllers/admin_public_body_controller_spec.rb - About 1 day to fix

                                    File info_request_event_spec.rb has 661 lines of code (exceeds 250 allowed). Consider refactoring.
                                    Open

                                    require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
                                    
                                    describe InfoRequestEvent do
                                      describe "when checking for a valid state" do
                                        it 'should add an error message for described_state if it is not valid' do
                                    Severity: Major
                                    Found in spec/models/info_request_event_spec.rb - About 1 day to fix

                                      File public_body.rb has 593 lines of code (exceeds 250 allowed). Consider refactoring.
                                      Open

                                      require 'csv'
                                      require 'securerandom'
                                      require 'set'
                                      require 'confidence_intervals'
                                      
                                      
                                      Severity: Major
                                      Found in app/models/public_body.rb - About 1 day to fix

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

                                        class User < ActiveRecord::Base
                                          include AlaveteliFeatures::Helpers
                                          include AlaveteliPro::PhaseCounts
                                          rolify
                                          strip_attributes :allow_empty => true
                                        Severity: Major
                                        Found in app/models/user.rb - About 1 day to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language