Method delete
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
def delete
if dynamo_tables.empty? && lambdas.empty? && api_gateways.empty?
puts 'Nothing to Deleting.'
return
end
- 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
Consider simplifying this complex logical expression. Open
unless options[:lambda_client] && options[:dynamo_client] && options[:api_gateway_client]
access_key_id = options[:access_key_id] || ENV['AWS_ACCESS_KEY_ID'] || ENV['ACCESS_KEY'] ||
raise(ArgumentError, 'Cannot find AWS Access Key ID.')
secret_access_key = options[:secret_access_key] || ENV['AWS_SECRET_ACCESS_KEY'] || ENV['SECRET_KEY'] ||
Method deploy
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
def deploy(environment_options)
environment_parameter_guard(environment_options)
if no_op?
puts 'Nothing to deploy.'
return
- 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 teardown
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
def teardown(environment_options)
environment_parameter_guard(environment_options)
if no_op?
puts 'Nothing to teardown.'
return
- 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 deploy
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
def deploy(environment_options)
environment_parameter_guard(environment_options)
if no_op?
puts 'Nothing to deploy.'
return
Method teardown
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
def teardown(environment_options)
environment_parameter_guard(environment_options)
if no_op?
puts 'Nothing to teardown.'
return
Method delete
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
def delete
if dynamo_tables.empty? && lambdas.empty? && api_gateways.empty?
puts 'Nothing to Deleting.'
return
end
Method initialize
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def initialize(options = {})
unless options[:lambda_client] && options[:dynamo_client] && options[:api_gateway_client]
access_key_id = options[:access_key_id] || ENV['AWS_ACCESS_KEY_ID'] || ENV['ACCESS_KEY'] ||
raise(ArgumentError, 'Cannot find AWS Access Key ID.')
- 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"