Showing 630 of 1,221 total issues
Method end_element
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def end_element(name)
case name
when 'RequestId'
@response[name] = value
when 'VersionId'
- 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 end_element
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def end_element(name)
case name
when 'GroupName', 'PolicyName'
@response[name] = value
when 'PolicyDocument'
- 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 describe_cluster_snapshots
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def describe_cluster_snapshots(options = {})
cluster_identifier = options[:cluster_identifier]
snapshot_identifier = options[:snapshot_identifier]
start_time = options[:start_time]
end_time = options[:end_time]
- 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 describe_events
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def describe_events(options = {})
source_identifier = options[:source_identifier]
source_type = options[:source_type]
start_time = options[:start_time]
end_time = options[:end_time]
- 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 create_vpc
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def create_vpc(cidrBlock, options = {})
Excon::Response.new.tap do |response|
if cidrBlock
response.status = 200
vpc_id = Fog::AWS::Mock.vpc_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"
Further reading
Method head_object
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def head_object(bucket_name, object_name, options={})
unless bucket_name
raise ArgumentError.new('bucket_name is required')
end
unless object_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 describe_orderable_db_instance_options
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def describe_orderable_db_instance_options(engine=nil, opts={})
params = {}
params['Engine'] = engine if engine
params['DBInstanceClass'] = opts[:db_instance_class] if opts[:db_instance_class]
params['EngineVersion'] = opts[:engine_version] if opts[:engine_version]
- 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 revoke_security_group_ingress
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def revoke_security_group_ingress(group_name, options = {})
options = Fog::AWS.parse_security_group_options(group_name, options)
group = self.data[:security_groups].values.find { |v| v['groupName'] == group_name }
group ||
- 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 put_streaming_distribution_config
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def put_streaming_distribution_config(distribution_id, etag, options = {})
distribution = self.data[:streaming_distributions][distribution_id]
if distribution
if distribution['ETag'] != etag
- 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 describe_instance_health
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def describe_instance_health(lb_name, instance_ids = [])
raise Fog::AWS::ELB::NotFound unless load_balancer = self.data[:load_balancers][lb_name]
instance_ids = [*instance_ids]
instance_ids = load_balancer['Instances'].map { |i| i['InstanceId'] } unless instance_ids.any?
- 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 set_load_balancer_policies_for_backend_server
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def set_load_balancer_policies_for_backend_server(lb_name, instance_port, policy_names)
if load_balancer = self.data[:load_balancers][lb_name]
# Ensure policies exist
policy_names.each do |policy_name|
unless load_balancer['Policies']['Proper'].find { |p| p['PolicyName'] == policy_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 describe_route_tables
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def describe_route_tables(filters = {})
unless filters.is_a?(Hash)
Fog::Logger.deprecation("describe_route_tables with #{filters.class} param is deprecated, use describe_route_tables('route-table-id' => []) instead [light_black](#{caller.first})[/]")
filters = {'route-table-id' => [*filters]}
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
Method revoke_security_group_egress
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def revoke_security_group_egress(group_name, options = {})
options = Fog::AWS.parse_security_group_options(group_name, options)
group = self.data[:security_groups].values.find { |v| v['groupName'] == 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 change_message_visibility
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def change_message_visibility(queue_url, receipt_handle, visibility_timeout)
Excon::Response.new.tap do |response|
if (queue = data[:queues][queue_url])
message_id, _ = queue[:receipt_handles].find { |message_id, receipts|
receipts.key?(receipt_handle)
- 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 detach_classic_link_vpc
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def detach_classic_link_vpc(instance_id, vpc_id, dry_run=false)
response = Excon::Response.new
vpc = self.data[:vpcs].find{ |v| v['vpcId'] == vpc_id }
instance = self.data[:instances][instance_id]
if vpc && instance
- 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 put_distribution_config
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def put_distribution_config(distribution_id, etag, options = {})
distribution = self.data[:distributions][distribution_id]
if distribution
if distribution['ETag'] != etag
- 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 describe_instance_status
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def describe_instance_status(filters = {})
raise ArgumentError.new("Filters must be a hash, but is a #{filters.class}.") unless filters.is_a?(Hash)
next_token = filters.delete('nextToken') || filters.delete('NextToken')
max_results = filters.delete('maxResults') || filters.delete('MaxResults')
all_instances = filters.delete('includeAllInstances') || filters.delete('IncludeAllInstances')
- 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 delete_route
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def delete_route(route_table_id, destination_cidr_block)
route_table = self.data[:route_tables].find { |routetable| routetable["routeTableId"].eql? route_table_id }
unless route_table.nil?
route = route_table['routeSet'].find { |route| route["destinationCidrBlock"].eql? destination_cidr_block }
if !route.nil? && route['gatewayId'] != "local"
- 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 modify_volume
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def modify_volume(volume_id, options={})
response = Excon::Response.new
volume = self.data[:volumes][volume_id]
if volume["volumeType"] == 'standard' && options['VolumeType']
- 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 create_launch_configuration
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def create_launch_configuration(image_id, instance_type, launch_configuration_name, options = {})
if block_device_mappings = options.delete('BlockDeviceMappings')
block_device_mappings.each_with_index do |mapping, i|
for key, value in mapping
options.merge!({ format("BlockDeviceMappings.member.%d.#{key}", i+1) => value })
- 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"