Showing 528 of 528 total issues
Method put_blob_pages
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def put_blob_pages(container_name, blob_name, start_range, end_range, data, options = {})
Method create_express_route_circuit_peering
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def create_express_route_circuit_peering(peering_type, peer_asn, primary_peer_address_prefix, secondary_peer_address_prefix, vlan_id, name)
Method create_disk
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def create_disk(disk_name, disk_size_in_gb, options = {})
msg = "Creating disk(#{disk_name}, #{disk_size_in_gb}). options: #{options}"
Fog::Logger.debug msg
raise ArgumentError, "disk_size_in_gb #{disk_size_in_gb} must be an integer" unless disk_size_in_gb.is_a?(Integer)
- 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 parse
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def self.parse(vault)
vault_hash = get_hash_from_object(vault)
vault_properties = vault.properties
unless vault_properties.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 validate_frontend_ip_configuration_params
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def validate_frontend_ip_configuration_params(frontend_ip_configuration)
required_params = [
:name,
:private_ipallocation_method
]
- 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_subnet
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def create_subnet(resource_group, subnet_name, virtual_network_name, address_prefix, network_security_group_id, route_table_id)
Method attach_route_table_to_subnet
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def attach_route_table_to_subnet(resource_group, subnet_name, virtual_network_name, address_prefix, network_security_group_id, route_table_id)
Method parse
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def self.parse(network_gateway)
hash = {}
hash['id'] = network_gateway.id
hash['name'] = network_gateway.name
hash['location'] = network_gateway.location
- 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_public_ip_object
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def get_public_ip_object(name, location, public_ip_allocation_method, idle_timeout_in_minutes, domain_name_label, tags)
Method parse
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def self.parse(gateway_ip_configuration)
hash = {}
if gateway_ip_configuration.is_a? Hash
hash['id'] = gateway_ip_configuration['id']
hash['name'] = gateway_ip_configuration['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 create_express_route_circuit
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def create_express_route_circuit(service_provider_prop, peerings, circuit_name, location, sku, tags)
Method check_azure_resource_exists
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def check_azure_resource_exists(resource_id, api_version = API_VERSION)
split_resource = resource_id.split('/') unless resource_id.nil?
raise 'Invalid Resource Id' if split_resource.count != 9
resource_group_name = get_resource_from_resource_id(resource_id, RESOURCE_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 create_express_route_circuit_peering
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def create_express_route_circuit_peering(peering_type, peer_asn, primary_peer_address_prefix, secondary_peer_address_prefix, vlan_id, name)
Method configure_os_disk_object
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def configure_os_disk_object(os_disk, os_disk_name, os_disk_caching, os_disk_size, platform, vm_name)
Method configure_os_disk_object
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def configure_os_disk_object(os_disk, os_disk_name, os_disk_caching, os_disk_size, platform, vm_name)
# It will use the os_disk_name provided or it will generate a name for itself if it is nil
os_disk.name = os_disk_name.nil? ? "#{vm_name}_os_disk" : os_disk_name
os_disk.os_type = platform
os_disk.disk_size_gb = os_disk_size unless os_disk_size.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 get_endpoint_object
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def get_endpoint_object(target_resource_id, target, weight, priority, endpoint_location, min_child_endpoints)
Method check_vm_exists
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def check_vm_exists(resource_group, name, async)
msg = "Checking Virtual Machine #{name}"
Fog::Logger.debug msg
begin
if async
- 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_or_update_network_security_group
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def create_or_update_network_security_group(resource_group_name, security_group_name, location, security_rules, tags)
Method wait_blob_copy_operation_to_finish
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def wait_blob_copy_operation_to_finish(container_name, blob_name, copy_id, copy_status, timeout = nil)
Method data_disk_params
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def data_disk_params(disk_name, disk_size = nil, storage_account = nil, disk_resource_group = nil, caching = nil)