Showing 1,291 of 1,823 total issues
Class PluginGenerator
has 43 methods (exceeds 20 allowed). Consider refactoring. Open
class PluginGenerator < AppBase # :nodoc:
add_shared_options_for "plugin"
alias_method :plugin_path, :app_path
File application.rb
has 397 lines of code (exceeds 250 allowed). Consider refactoring. Open
require "yaml"
require "active_support/core_ext/hash/keys"
require "active_support/core_ext/object/blank"
require "active_support/key_generator"
require "active_support/message_verifiers"
Class Dot
has 41 methods (exceeds 20 allowed). Consider refactoring. Open
class Dot < Arel::Visitors::Visitor
class Node # :nodoc:
attr_accessor :name, :id, :fields
def initialize(name, id, fields = [])
Class ExceptionWrapper
has 40 methods (exceeds 20 allowed). Consider refactoring. Open
class ExceptionWrapper
cattr_accessor :rescue_responses, default: Hash.new(:internal_server_error).merge!(
"ActionController::RoutingError" => :not_found,
"AbstractController::ActionNotFound" => :not_found,
"ActionController::MethodNotAllowed" => :method_not_allowed,
Function md5cycle
has 133 lines of code (exceeds 25 allowed). Consider refactoring. Open
function md5cycle(x, k) {
var a = x[0], b = x[1], c = x[2], d = x[3];
a += (b & c | ~b & d) + k[0] - 680876936 | 0;
a = (a << 7 | a >>> 25) + b | 0;
d += (a & b | ~a & c) + k[1] - 389564586 | 0;
Function md5cycle
has 133 lines of code (exceeds 25 allowed). Consider refactoring. Open
function md5cycle(x, k) {
var a = x[0], b = x[1], c = x[2], d = x[3];
a += (b & c | ~b & d) + k[0] - 680876936 | 0;
a = (a << 7 | a >>> 25) + b | 0;
d += (a & b | ~a & c) + k[1] - 389564586 | 0;
Function md5cycle
has 133 lines of code (exceeds 25 allowed). Consider refactoring. Open
function md5cycle(x, k) {
var a = x[0], b = x[1], c = x[2], d = x[3];
a += (b & c | ~b & d) + k[0] - 680876936 | 0;
a = (a << 7 | a >>> 25) + b | 0;
d += (a & b | ~a & c) + k[1] - 389564586 | 0;
Function md5cycle
has 133 lines of code (exceeds 25 allowed). Consider refactoring. Open
function md5cycle(x, k) {
var a = x[0], b = x[1], c = x[2], d = x[3];
a += (b & c | ~b & d) + k[0] - 680876936 | 0;
a = (a << 7 | a >>> 25) + b | 0;
d += (a & b | ~a & c) + k[1] - 389564586 | 0;
File database_statements.rb
has 386 lines of code (exceeds 250 allowed). Consider refactoring. Open
module ActiveRecord
module ConnectionAdapters # :nodoc:
module DatabaseStatements
def initialize
super
File calculations.rb
has 386 lines of code (exceeds 250 allowed). Consider refactoring. Open
require "active_support/core_ext/enumerable"
module ActiveRecord
# = Active Record \Calculations
module Calculations
File time_zone.rb
has 384 lines of code (exceeds 250 allowed). Consider refactoring. Open
require "tzinfo"
require "concurrent/map"
module ActiveSupport
# = Active Support \Time Zone
File compatibility.rb
has 384 lines of code (exceeds 250 allowed). Consider refactoring. Open
module ActiveRecord
class Migration
module Compatibility # :nodoc: all
def self.find(version)
version = version.to_s
File schema_cache.rb
has 380 lines of code (exceeds 250 allowed). Consider refactoring. Open
require "active_support/core_ext/file/atomic"
module ActiveRecord
module ConnectionAdapters
class SchemaReflection
File test_case.rb
has 380 lines of code (exceeds 250 allowed). Consider refactoring. Open
require "rack/session/abstract/id"
require "active_support/core_ext/hash/conversions"
require "active_support/core_ext/object/to_query"
require "active_support/core_ext/module/anonymous"
require "active_support/core_ext/module/redefine_method"
Method fetch
has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring. Open
def fetch(name, options = nil, &block)
if block_given?
options = merged_options(options)
key = normalize_key(name, options)
- 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 store_accessor
has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring. Open
def store_accessor(store_attribute, *keys, prefix: nil, suffix: nil)
keys = keys.flatten
accessor_prefix =
case prefix
- 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
Class SelectManager
has 38 methods (exceeds 20 allowed). Consider refactoring. Open
class SelectManager < Arel::TreeManager
include Arel::Crud
STRING_OR_SYMBOL_CLASS = [Symbol, String]
File plugin_generator.rb
has 375 lines of code (exceeds 250 allowed). Consider refactoring. Open
require "active_support/core_ext/hash/except"
require "rails/generators/rails/app/app_generator"
require "date"
module Rails
Method deserialize
has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring. Open
def deserialize(value)
return value unless value.is_a?(::String)
scanner = StringScanner.new(value)
hash = {}
- 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 with_raw_connection
has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring. Open
def with_raw_connection(allow_retry: false, materialize_transactions: true)
@lock.synchronize do
connect! if @raw_connection.nil? && reconnect_can_restore_state?
self.materialize_transactions if materialize_transactions
- 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"