3scale/porta

View on GitHub

Showing 5,197 of 5,556 total issues

Method path_to has 527 lines of code (exceeds 25 allowed). Consider refactoring.
Open

def path_to(page_name, *args) # rubocop:disable Metrics/AbcSize, Metrics/CyclomaticComplexity, Metrics/MethodLength, Metrics/PerceivedComplexity
case page_name
 
# Public
when /the home\s?page/
Severity: Major
Found in features/support/paths.rb - About 2 days to fix

    File routes.rb has 884 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    require 'routing_constraints'
    require 'prometheus_exporter_port'
     
    # rubocop:disable Metrics/BlockLength
     
     
    Severity: Major
    Found in config/routes.rb - About 2 days to fix

      Method up has 357 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      def self.up
      create_table "attachment_versions", :force => true do |t|
      t.integer "attachment_id"
      t.integer "version"
      t.string "file_path"
      Severity: Major
      Found in db/migrate/20100125103539_browser_cms_tables.rb - About 1 day to fix

        Method up has 339 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        def self.up
        change_column :account_group_memberships, :id, "bigint auto_increment"
        change_column :account_group_memberships, :account_id, "bigint"
        change_column :account_group_memberships, :group_id, "bigint"
        change_column :account_group_memberships, :tenant_id, "bigint"
        Severity: Major
        Found in db/migrate/20120117134623_increase_ids_to64_bit.rb - About 1 day to fix

          Method down has 339 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          def self.down
          change_column :account_group_memberships, :id, :integer
          change_column :account_group_memberships, :account_id, :integer
          change_column :account_group_memberships, :group_id, :integer
          change_column :account_group_memberships, :tenant_id, :integer
          Severity: Major
          Found in db/migrate/20120117134623_increase_ids_to64_bit.rb - About 1 day to fix

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

            class IncreaseIdsTo64Bit < ActiveRecord::Migration
            def self.up
            change_column :account_group_memberships, :id, "bigint auto_increment"
            change_column :account_group_memberships, :account_id, "bigint"
            change_column :account_group_memberships, :group_id, "bigint"
            Severity: Major
            Found in db/migrate/20120117134623_increase_ids_to64_bit.rb - About 1 day to fix

              Similar blocks of code found in 2 locations. Consider refactoring.
              Open

              System::Database::Oracle.define do
              trigger 'accounts' do
              <<~SQL
              IF :new.buyer = 1 THEN
              :new.tenant_id := :new.provider_account_id;
              Severity: Major
              Found in lib/system/database/definitions/oracle.rb and 1 other location - About 1 day to fix
              lib/system/database/definitions/postgres.rb on lines 5..589

              Similar blocks of code found in 2 locations. Consider refactoring.
              Open

              System::Database::Postgres.define do
              trigger 'accounts' do
              <<~SQL
              IF NEW.buyer = TRUE THEN
              NEW.tenant_id := NEW.provider_account_id;
              Severity: Major
              Found in lib/system/database/definitions/postgres.rb and 1 other location - About 1 day to fix
              lib/system/database/definitions/oracle.rb on lines 5..590

              File 20121018100514_removing_bcms_tables.rb has 632 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              class RemovingBcmsTables < ActiveRecord::Migration
              def self.up
              drop_table :account_group_memberships
              drop_table :app_exhibits
              drop_table :assets
              Severity: Major
              Found in db/migrate/20121018100514_removing_bcms_tables.rb - About 1 day to fix

                Class Service has 63 methods (exceeds 20 allowed). Consider refactoring.
                Open

                class Service < ApplicationRecord # rubocop:disable Metrics/ClassLength
                include Searchable
                include Backend::ModelExtensions::Service
                include Logic::Contracting::Service
                include Logic::PlanChanges::Service
                Severity: Major
                Found in app/models/service.rb - About 1 day to fix

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

                  class User < ApplicationRecord
                  include Symbolize
                   
                  include Fields::Fields
                  required_fields_are :username, :email
                  Severity: Major
                  Found in app/models/user.rb - About 1 day to fix

                    File paths.rb has 536 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    World(Module.new do
                    break unless defined?(DeveloperPortal)
                     
                    include System::UrlHelpers.cms_url_helpers
                     
                     
                    Severity: Major
                    Found in features/support/paths.rb - About 1 day to fix

                      Authorization header leak on port redirect in mechanize
                      Open

                      mechanize (2.7.7)
                      Severity: Minor
                      Found in Gemfile.lock by bundler-audit

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

                      class Account < ApplicationRecord
                      attribute :credit_card_expires_on, :date
                      self.ignored_columns = %i[proxy_configs_file_name proxy_configs_content_type proxy_configs_file_size
                      proxy_configs_updated_at proxy_configs_conf_file_name proxy_configs_conf_content_type
                      proxy_configs_conf_file_size proxy_configs_conf_updated_at]
                      Severity: Major
                      Found in app/models/account.rb - About 1 day to fix

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

                        class Invoice < ApplicationRecord
                        %I[due_on period issued_on last_charging_retry].each do |attr|
                        attribute attr, :date
                        end
                         
                         
                        Severity: Major
                        Found in app/models/invoice.rb - About 1 day to fix

                          Method provider_request has a Cognitive Complexity of 50 (exceeds 5 allowed). Consider refactoring.
                          Open

                          def provider_request
                          return unless provider?
                           
                          hourly(&:group)
                           
                           
                          Severity: Minor
                          Found in lib/tracking_notifications.rb - About 7 hrs to fix

                          Class Cinstance has 52 methods (exceeds 20 allowed). Consider refactoring.
                          Open

                          class Cinstance < Contract
                          include SaveDestroyForServiceAssociation
                          # Maximum number of cinstances permitted between provider and buyer
                          MAX = 10
                           
                           
                          Severity: Major
                          Found in app/models/cinstance.rb - About 7 hrs to fix

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

                            class Plan < ApplicationRecord
                            include Searchable
                            class PeriodRangeCalculationError < StandardError; end
                            include Symbolize
                             
                             
                            Severity: Major
                            Found in app/models/plan.rb - About 7 hrs to fix

                              File service.rb has 442 lines of code (exceeds 250 allowed). Consider refactoring.
                              Open

                              require 'backend_client'
                               
                              class Service < ApplicationRecord # rubocop:disable Metrics/ClassLength
                              include Searchable
                              include Backend::ModelExtensions::Service
                              Severity: Minor
                              Found in app/models/service.rb - About 6 hrs to fix

                                File invoice.rb has 426 lines of code (exceeds 250 allowed). Consider refactoring.
                                Open

                                class Invoice < ApplicationRecord
                                %I[due_on period issued_on last_charging_retry].each do |attr|
                                attribute attr, :date
                                end
                                 
                                 
                                Severity: Minor
                                Found in app/models/invoice.rb - About 6 hrs to fix
                                  Severity
                                  Category
                                  Status
                                  Source
                                  Language