Showing 630 of 1,221 total issues
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 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_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 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 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_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"
Further reading
Method put_notification_configuration
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def put_notification_configuration(auto_scaling_group_name, notification_types, topic_arn)
unless self.data[:auto_scaling_groups].key?(auto_scaling_group_name)
raise Fog::AWS::AutoScaling::ValidationError.new("AutoScalingGroup name not found - #{auto_scaling_group_name}")
end
if notification_types.to_a.empty?
- 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 request_unsigned
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def request_unsigned(params)
idempotent = params.delete(:idempotent)
parser = params.delete(:parser)
params['Version'] = '2011-06-15'
- 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 connection
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def connection(scheme, host, port)
uri = "#{scheme}://#{host}:#{port}"
if @persistent
unless uri == @connection_uri
@connection_uri = uri
- 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"