Showing 207 of 528 total issues
Method put_blob_block
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def put_blob_block(container_name, blob_name, block_id, data, options = {})
Method define_vnet_object
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def define_vnet_object(location, address_prefixes, dns_servers, subnets, tags)
Method detach_route_table_from_subnet
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def detach_route_table_from_subnet(resource_group, subnet_name, virtual_network_name, address_prefix, network_security_group_id)
Method get_storage_account_params
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def get_storage_account_params(sku_name, location, replication, encryption_enabled, tags)
Method get_availability_set_properties
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def get_availability_set_properties(location, fault_domain_count, update_domain_count, use_managed_disk, tags)
Method copy_vhd_to_storage_account
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def copy_vhd_to_storage_account(resource_group, storage_account_name, vhd_path, location, vm_name)
Method image_config_params
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def image_config_params(location, new_vhd_path, platform, resource_group, vm_name)
Method format_server_parameters
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def format_server_parameters(location, version, admin_login, admin_password, tags)
Method detach_network_security_group_from_subnet
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def detach_network_security_group_from_subnet(resource_group, subnet_name, virtual_network_name, address_prefix, route_table_id)
Method get_unmanaged_disk_object
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def get_unmanaged_disk_object(disk_name, disk_size, lun, storage_account_name, access_key)
Method initialize
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def initialize(body)
if body.respond_to?(:read)
if body.respond_to?(:rewind)
begin
body.rewind
- 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 7 (exceeds 5 allowed). Consider refactoring. Open
def self.parse(frontend_ip_configuration)
hash = {}
hash['id'] = frontend_ip_configuration.id
hash['name'] = frontend_ip_configuration.name
hash['subnet_id'] = frontend_ip_configuration.subnet.id unless frontend_ip_configuration.subnet.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 initialize
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def initialize(body)
if body.respond_to?(:read)
if body.respond_to?(:rewind)
begin
body.rewind
- 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_ip_configurations
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def validate_ip_configurations(ip_configurations)
unless ip_configurations.is_a?(Array)
raise(ArgumentError, ':ip_configurations must be an Array')
end
unless ip_configurations.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 get_network_interface_object
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def get_network_interface_object(name, location, subnet_id, public_ip_address_id, network_security_group_id, ip_config_name, private_ip_allocation_method, private_ip_address, load_balancer_backend_address_pools_ids, load_balancer_inbound_nat_rules_ids, tags, enable_accelerated_networking)
if public_ip_address_id
public_ipaddress = Azure::ARM::Network::Models::PublicIPAddress.new
public_ipaddress.id = public_ip_address_id
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_blob
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def get_blob(container_name, blob_name, options = {}, &block)
if block_given?
get_blob_with_block_given(container_name, blob_name, options, &block)
else
options[:request_id] = SecureRandom.uuid
- 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 copy_vhd_to_storage_account
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def copy_vhd_to_storage_account(resource_group, storage_account_name, vhd_path, location, vm_name)
# Copy if VHD does not exist belongs to same storage account.
vhd_storage_account_name = (vhd_path.split('/')[2]).split('.')[0]
if storage_account_name != vhd_storage_account_name
if storage_account_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 detach_data_disk_from_vm
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def detach_data_disk_from_vm(resource_group, vm_name, disk_name, async)
msg = "Detaching Data Disk #{disk_name} from Virtual Machine #{vm_name} in Resource Group #{resource_group}."
Fog::Logger.debug msg
vm = get_virtual_machine_instance(resource_group, vm_name)
vm.storage_profile.data_disks.each_with_index do |disk, index|
- 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 6 (exceeds 5 allowed). Consider refactoring. Open
def self.parse(load_balancing_rule)
hash = {}
hash['id'] = load_balancing_rule.id
hash['name'] = load_balancing_rule.name
hash['frontend_ip_configuration_id'] = load_balancing_rule.frontend_ipconfiguration.id unless load_balancing_rule.frontend_ipconfiguration.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 parse
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def self.parse(vpn_client_config)
hash = {}
hash['address_pool'] = []
vpn_client_config.vpn_client_address_pool.each do |address_prefix|
hash['address_pool'] << address_prefix
- 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"