Showing 4 of 4 total issues
Class NullDBAdapter
has 47 methods (exceeds 20 allowed). Consider refactoring. Open
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 290 lines of code (exceeds 250 allowed). Consider refactoring. Open
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 insert
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def insert(statement, name = nil, primary_key = nil, object_id = nil, sequence_name = nil, binds = [], returning: nil)
Method columns
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
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"