Showing 156 of 615 total issues
Method credentials
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def credentials
if @token
identity = {'token' => {'id' => @token}}
else
raise CredentialsError, "#{self.class}: User name is required" if @user.name.nil?
- 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 list_snapshots
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def list_snapshots(options = true, options_deprecated = {})
if options.kind_of?(Hash)
path = 'snapshots'
query = options
else
- 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 convert_update_params
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def convert_update_params(params)
params = params.map do |key, value|
{
"path" => "/#{key}",
"op" => value ? "replace" : "remove"
- 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 list_snapshots
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def list_snapshots(options = true)
if options.kind_of?(Hash)
path = 'os-snapshots'
query = options
else
- 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 list_volumes
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def list_volumes(options = true, options_deprecated = {})
if options.kind_of?(Hash)
path = 'volumes'
query = options
else
- 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_security_group_rule
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def create_security_group_rule(parent_group_id, ip_protocol, from_port, to_port, cidr, group_id = nil)
Method create_temp_url
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def create_temp_url(container, object, expires, method, options = {})
raise ArgumentError, "Insufficient parameters specified." unless container && object && expires && method
raise ArgumentError, "Storage must be instantiated with the :openstack_temp_url_key option" if @openstack_temp_url_key.nil?
scheme = options[:scheme] || @openstack_management_uri.scheme
- 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_stack
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def create_stack(arg1, arg2 = nil)
if arg1.kind_of?(Hash)
# Normal use: create_stack(options)
options = arg1
else
- 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 list_volumes
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def list_volumes(options = true)
if options.kind_of?(Hash)
path = 'os-volumes'
query = options
else
- 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 update_meta
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def update_meta(collection_name, parent_id, key, value)
if collection_name == "images"
unless list_images_detail.body['images'].find { |image| image['id'] == parent_id }
raise Fog::OpenStack::Compute::NotFound
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 create_lbaas_healthmonitor
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def create_lbaas_healthmonitor(pool_id, type, delay, timeout, max_retries, options = {})
Method rebuild_server
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def rebuild_server(server_id, image_ref, name, admin_pass = nil, metadata = nil, personality = nil)
Method rebuild_server
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def rebuild_server(server_id, _image_ref, _name, _admin_pass = nil, _metadata = nil, _personality = nil)
Method get_endpoint_url
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def get_endpoint_url(names, interfaces, region = nil)
# TODO: Inject OpenStack Service Types Authority
names_list = if names.kind_of?(String)
[names]
else
- 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_security_group_rule
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def create_security_group_rule(parent_group_id, ip_protocol, from_port, to_port, cidr, group_id = nil)
Method create_lb_member
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def create_lb_member(pool_id, address, protocol_port, weight, options = {})
Method create_lb_health_monitor
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def create_lb_health_monitor(type, delay, timeout, max_retries, options = {})
Method rebuild
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def rebuild(image_ref, name, admin_pass = nil, metadata = nil, personality = nil)
Method create_user
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def create_user(name, _password, email, tenantId = nil, enabled = true)
Method copy_object
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def copy_object(source_container_name, source_object_name, target_container_name, target_object_name, options = {})