Showing 630 of 1,218 total issues
Method delete_message
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def delete_message(queue_url, receipt_handle)
Excon::Response.new.tap do |response|
if (queue = data[:queues][queue_url])
message_id, _ = queue[:receipt_handles].find { |msg_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 get_object_acl
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def get_object_acl(bucket_name, object_name, options = {})
response = Excon::Response.new
if acl = self.data[:acls][:object][bucket_name] && self.data[:acls][:object][bucket_name][object_name]
response.status = 200
if acl.is_a?(String)
- 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_db_cluster
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def create_db_cluster(cluster_name, options={})
response = Excon::Response.new
if self.data[:clusters][cluster_name]
raise Fog::AWS::RDS::IdentifierTaken.new("DBClusterAlreadyExists")
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 get_invalidation_list
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def get_invalidation_list(distribution_id, options = {})
distribution = self.data[:distributions][distribution_id]
unless distribution
Fog::AWS::CDN::Mock.error(:no_such_distribution)
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 describe_spot_price_history
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def describe_spot_price_history(filters = {})
params = {}
for key in %w(AvailabilityZone StartTime EndTime MaxResults NextToken)
if filters.is_a?(Hash) && filters.key?(key)
- 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 attach_internet_gateway
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def attach_internet_gateway(internet_gateway_id, vpc_id)
response = Excon::Response.new
if internet_gateway_id && vpc_id
response.status = 200
response.body = {
- 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 associate_dhcp_options
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def associate_dhcp_options(dhcp_options_id, vpc_id)
response = Excon::Response.new
if dhcp_options_id && vpc_id
response.status = 200
response.body = {
- 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 deregister_container_instance
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def deregister_container_instance(params={})
response = Excon::Response.new
response.status = 200
instance_id = params.delete('containerInstance')
- 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_container_instances
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def describe_container_instances(params={})
response = Excon::Response.new
response.status = 200
cluster = params.delete('cluster') || 'default'
- 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 get_function
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def get_function(params={})
response = Excon::Response.new
response.status = 200
response.body = ''
- 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_task_definition
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def describe_task_definition(params={})
response = Excon::Response.new
response.status = 200
taskdef_error = "ClientException => Task Definition can not be blank."
- 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_event_source_mapping
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def create_event_source_mapping(params={})
enabled = params.delete('Enabled') || false
batch_size = params.delete('BatchSize') || 100
event_source_arn = params.delete('EventSourceArn')
function_name = params.delete('FunctionName')
- 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 get_user
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def get_user(username = nil, options = {})
response = Excon::Response.new
user_body = nil
if username.nil? # show current user
- 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_internet_gateway
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def detach_internet_gateway(internet_gateway_id, vpc_id)
response = Excon::Response.new
if internet_gateway_id && vpc_id
response.status = 200
response.body = {
- 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_tasks
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def describe_tasks(params={})
response = Excon::Response.new
response.status = 200
unless tasks = params.delete('tasks')
- 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_access_key
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def create_access_key(options)
#FIXME: Not 100% correct as AWS will use the signing credentials when there is no 'UserName' in the options hash
# Also doesn't raise an error when there are too many keys
if user = options['UserName']
if data[:users].key? user
- 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_vpc_attribute
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def modify_vpc_attribute(vpc_id, options = {})
response = Excon::Response.new
if options.size == 0
raise Fog::AWS::Compute::Error.new("InvalidParameterCombination => No attributes specified.")
elsif options.size > 1
- 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_file_systems
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def describe_file_systems(options={})
response = Excon::Response.new
file_systems = if id = options[:id]
if fs = self.data[:file_systems][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 put_scheduled_update_group_action
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def put_scheduled_update_group_action(auto_scaling_group_name, scheduled_action_name, time=nil, options = {})
# The 'Time' parameter is now an alias for StartTime and needs to be identical if specified.
time = options['StartTime'].nil? ? time : options['StartTime']
if !time.nil?
time = time.class == Time ? time.utc.iso8601 : Time.parse(time).utc.iso8601
- 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_services
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def describe_services(params={})
response = Excon::Response.new
response.status = 200
cluster = params.delete('cluster') || 'default'
- 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"