Showing 25 of 37 total issues
Method tfstate
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def tfstate
eips.inject({}) do |resources, addr|
attributes = {
"association_id" => addr.association_id,
"domain" => addr.domain,
- 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 configure_aws
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def configure_aws(options)
Aws.config[:credentials] = Aws::SharedCredentials.new(profile_name: options[:profile]) if options[:profile]
Aws.config[:region] = options[:region] if options[:region]
if options[:assume]
- 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 tfstate
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def tfstate
topics.inject({}) do |resources, topic|
attributes = {
"name" => module_name_of(topic),
"id" => topic["TopicArn"],
- 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 security_groups_in
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def security_groups_in(permission, security_group)
permission.user_id_group_pairs.map do |range|
# EC2-Classic, same account
if security_group.owner_id == range.user_id && !range.group_name.nil?
range.group_name
- 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 tfstate
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def tfstate
queues.inject({}) do |resources, queue|
attributes = {
"name" => module_name_of(queue),
"id" => queue["QueueUrl"],
- 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"