Showing 6 of 6 total issues
Class NullDBAdapter
has 50 methods (exceeds 20 allowed). Consider refactoring. Open
class ActiveRecord::ConnectionAdapters::NullDBAdapter < ActiveRecord::ConnectionAdapters::AbstractAdapter
# A convenience method for integratinginto RSpec. See README for example of
# use.
def self.insinuate_into_spec(config)
File core.rb
has 320 lines of code (exceeds 250 allowed). Consider refactoring. Open
class ActiveRecord::ConnectionAdapters::NullDBAdapter < ActiveRecord::ConnectionAdapters::AbstractAdapter
# A convenience method for integratinginto RSpec. See README for example of
# use.
def self.insinuate_into_spec(config)
Method add_index_options
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
def add_index_options(table_name, column_name, options = {})
column_names = Array.wrap(column_name)
index_name = index_name(table_name, :column => column_names)
if Hash === options # legacy support, since this param was a string
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method insert
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def insert(statement, name = nil, primary_key = nil, object_id = nil, sequence_name = nil, binds = [])
Method initialize
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def initialize(config={})
@log = StringIO.new
@logger = Logger.new(@log)
@last_unique_id = 0
@tables = {'schema_info' => new_table_definition(nil)}
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method columns
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def columns(table_name, name = nil)
if @tables.size <= 1
ActiveRecord::Migration.verbose = false
schema_path = if Pathname(@schema_path).absolute?
@schema_path
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"