Showing 12 of 24 total issues
Function exports
has 68 lines of code (exceeds 25 allowed). Consider refactoring. Confirmed
module.exports = function(api) {
var validEnv = ['development', 'test', 'production']
var currentEnv = api.env()
var isDevelopmentEnv = api.env('development')
var isProductionEnv = api.env('production')
Method check
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
def check # rubocop:disable Metrics/AbcSize, Metrics/MethodLength
Helper.parent_models.flat_map do |model|
DebugContext.with(model: model.name) do
next unless configuration.enabled?('DatabaseConsistencyDatabases', Helper.database_name(model)) &&
configuration.enabled?(model.name.to_s)
- 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 check
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
def check # rubocop:disable Metrics/AbcSize, Metrics/MethodLength, Metrics/CyclomaticComplexity
Helper.parent_models.flat_map do |model|
DebugContext.with(model: model.name) do
next unless configuration.enabled?('DatabaseConsistencyDatabases', Helper.database_name(model)) &&
configuration.enabled?(model.name.to_s)
- 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 report
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def report(catch_errors: true)
return unless preconditions
@report ||= check
rescue StandardError => e
- 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 run
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def run(*args, **opts) # rubocop:disable Metrics/MethodLength
configuration = Configuration.new(*args)
reports = Processors.reports(configuration)
if opts[:autofix]
- 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 check
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def check # rubocop:disable Metrics/MethodLength, Metrics/AbcSize
if converted_type(associated_column).cover?(converted_type(primary_column))
report_template(:ok)
elsif !(converted_type(associated_column).numeric? && converted_type(primary_column).numeric?)
report_template(:ok)
- 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 check
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def check # rubocop:disable Metrics/AbcSize, Metrics/MethodLength
Helper.models.flat_map do |model|
DebugContext.with(model: model.name) do
next unless configuration.enabled?('DatabaseConsistencyDatabases', Helper.database_name(model)) &&
configuration.enabled?(model.name.to_s)
- 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 check
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def check # rubocop:disable Metrics/MethodLength, Metrics/AbcSize
Helper.project_models.flat_map do |model|
DebugContext.with(model: model.name) do
next unless configuration.enabled?('DatabaseConsistencyDatabases', Helper.database_name(model)) &&
configuration.enabled?(model.name.to_s)
- 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 check
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def check # rubocop:disable Metrics/AbcSize, Metrics/MethodLength
Helper.parent_models.flat_map do |model|
DebugContext.with(model: model.name) do
next unless configuration.enabled?('DatabaseConsistencyDatabases', Helper.database_name(model)) &&
configuration.enabled?(model.name.to_s)
- 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 enabled?
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def enabled?(*path)
current = configuration
value = global_enabling
- 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 check
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def check # rubocop:disable Metrics/AbcSize, Metrics/MethodLength
Helper.parent_models.flat_map do |model|
DebugContext.with(model: model.name) do
next unless configuration.enabled?('DatabaseConsistencyDatabases', Helper.database_name(model)) &&
configuration.enabled?(model.name.to_s)
- 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 check
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def check # rubocop:disable Metrics/AbcSize, Metrics/MethodLength
Helper.models.flat_map do |model|
DebugContext.with(model: model.name) do
next unless configuration.enabled?('DatabaseConsistencyDatabases', Helper.database_name(model)) &&
configuration.enabled?(model.name.to_s)
- 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"