Showing 83 of 83 total issues
Assignment Branch Condition size for check_for_indexes is too high. [29.83/15] Open
def self.check_for_indexes eager_load_if_needed required_indexes = Hash.new([])
- Read upRead up
- Exclude checks
Method has too many lines. [24/10] Open
def self.check_for_indexes eager_load_if_needed required_indexes = Hash.new([])
- Read upRead up
- Exclude checks
Method check_for_indexes
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
def self.check_for_indexes eager_load_if_needed required_indexes = Hash.new([])
- Read upRead up
Complex method LolDba::IndexFinder::check_for_indexes (39.4) Open
def self.check_for_indexes eager_load_if_needed required_indexes = Hash.new([])
- Read upRead up
- Exclude checks
Method has too many lines. [12/10] Open
def parse_options options = {} OptionParser.new do |opts| opts.on('-d', '--debug', 'Show stack traces when an error occurs.') do |opt|
- Read upRead up
- Exclude checks
Assignment Branch Condition size for find_association_fk is too high. [17.52/15] Open
def find_association_fk if (source = reflection_options.options[:source]) association_reflection = through_reflections[source.to_s] return nil if association_reflection.options[:polymorphic] get_through_foreign_key(association_reflection.klass, reflection_options)
- Read upRead up
- Exclude checks
LolDba::CLI#select_action refers to 'arg' more than self (maybe move it to another class?) Open
if arg =~ /db:find_indexes/ success = LolDba::IndexFinder.run exit(1) if success elsif arg !~ /\[/ LolDba::SqlGenerator.run('all')
- Read upRead up
- Exclude checks
LolDba::ErrorLogging#self.log has approx 10 statements Open
def self.log(model_class, reflection_options, exception)
- Read upRead up
- Exclude checks
LolDba::MigrationMocker#redefine_metadata_methods has approx 14 statements Open
def redefine_metadata_methods
- Read upRead up
- Exclude checks
LolDba::MigrationFormatter#format_for_migration has approx 6 statements Open
def format_for_migration(missing_indexes)
- Read upRead up
- Exclude checks
LolDba::Migration#generate_instead_of_executing refers to 'migration_mocker' more than self (maybe move it to another class?) Open
migration_mocker.redefine_migration_methods yield migration_mocker.reset_methods
- Read upRead up
- Exclude checks
LolDba::IndexFinder#self.check_for_indexes has approx 15 statements Open
def self.check_for_indexes
- Read upRead up
- Exclude checks
LolDba::BelongsTo#relation_columns has approx 7 statements Open
def relation_columns
- Read upRead up
- Exclude checks
LolDba::IndexFinder#self.missing_indexes has approx 6 statements Open
def self.missing_indexes(indexes_required)
- Read upRead up
- Exclude checks
LolDba::CLI#parse_options contains iterators nested 2 deep Open
opts.on('-d', '--debug',
- Read upRead up
- Exclude checks
LolDba::MigrationFormatter#format_for_migration contains iterators nested 2 deep Open
keys_to_add.each do |key|
- Read upRead up
- Exclude checks
LolDba::IndexFinder#self.check_for_indexes contains iterators nested 2 deep Open
reflections.each_pair do |reflection_name, reflection_options|
- Read upRead up
- Exclude checks
LolDba::CLI#parse_options has approx 8 statements Open
def parse_options
- Read upRead up
- Exclude checks