plentz/lol_dba

View on GitHub

Showing 83 of 83 total issues

LolDba::RelationInspectorFactory has no descriptive comment
Open

class RelationInspectorFactory

LolDba has no descriptive comment
Open

module LolDba
Severity: Minor
Found in lib/lol_dba/version.rb by reek

Method missing_indexes has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

def self.missing_indexes(indexes_required)
missing_indexes = {}
indexes_required.each do |table_name, foreign_keys|
next if foreign_keys.blank? || !tables.include?(table_name.to_s)
keys_to_add = foreign_keys.uniq - existing_indexes(table_name)
Severity: Minor
Found in lib/lol_dba/index_finding/index_finder.rb - About 35 mins to fix

LolDba::Railtie has no descriptive comment
Open

class Railtie < Rails::Railtie
Severity: Minor
Found in lib/lol_dba/railtie.rb by reek

LolDba has no descriptive comment
Open

module LolDba
Severity: Minor
Found in lib/lol_dba.rb by reek

LolDba::HasAndBelongsToMany has no descriptive comment
Open

class HasAndBelongsToMany < RelationInspector

LolDba::RelationInspector#get_through_foreign_key calls 'reflection.options[:foreign_key]' 2 times
Open

if reflection.options[:foreign_key]
reflection.options[:foreign_key]

LolDba::MigrationFormatter has no descriptive comment
Open

class MigrationFormatter

LolDba::SqlGenerator has no descriptive comment
Open

class SqlGenerator

LolDba::CLI has no descriptive comment
Open

class CLI
Severity: Minor
Found in lib/lol_dba/cli.rb by reek

LolDba::BelongsTo#non_polymorphic_fk manually dispatches method call
Open

foreign_key ||= if reflection_options.respond_to?(:primary_key_name)

LolDba::HasMany has no descriptive comment
Open

class HasMany < RelationInspector
Severity: Minor
Found in lib/lol_dba/index_finding/has_many.rb by reek

LolDba::Writer has no descriptive comment
Open

class Writer
Severity: Minor
Found in lib/lol_dba/sql_migrations/writer.rb by reek

LolDba::BelongsTo has no descriptive comment
Open

class BelongsTo < RelationInspector

LolDba::RelationInspector has no descriptive comment
Open

class RelationInspector

LolDba::MigrationMocker has no descriptive comment
Open

class MigrationMocker

LolDba::IndexFinder#self.check_for_indexes calls 'model_class.base_class' 2 times
Open

index_name = [model_class.inheritance_column, model_class.base_class.primary_key].sort
required_indexes[model_class.base_class.table_name] += [index_name]

LolDba::RelationInspector#get_through_foreign_key calls 'reflection.options' 2 times
Open

if reflection.options[:foreign_key]
reflection.options[:foreign_key]

LolDba::Migration has no descriptive comment
Open

class Migration

LolDba::RailsCompatibility has no descriptive comment
Open

class RailsCompatibility
Severity: Minor
Found in lib/lol_dba/rails_compatibility.rb by reek
Severity
Category
Status
Source
Language