fog/fog-azure-rm

View on GitHub

Showing 528 of 528 total issues

Unused method argument - resource_group. If it's necessary, use _ or _resource_group as an argument name to indicate that it won't be used.
Open

def check_database_exists(resource_group, server_name, name)

%w-literals should be delimited by [ and ].
Open

%w(10.1.0.0/16 10.2.0.0/16)

Prefer JSON.parse over JSON.load.
Open

@network_client.deserialize(nsr_mapper, JSON.load(nsr), 'result.body')

Trailing whitespace detected.
Open

if async

Unused method argument - resource_group. If it's necessary, use _ or _resource_group as an argument name to indicate that it won't be used.
Open

def check_firewall_rule_exists(resource_group, server_name, rule_name)

%w-literals should be delimited by [ and ].
Open

%w(1.2.3.4 1.2.3.5 1.2.3.6)

Put empty method definitions on a single line.
Open

def update_subnet_id_in_gateway_ip_configuration(*)
end

Interpolation in single quoted string detected. Use double quoted strings if you need interpolation.
Open

Fog::Logger.debug 'Network Security Group attached to Subnet #{subnet_name} successfully.'

%w-literals should be delimited by [ and ].
Open

'advertisedpublicprefixes' => %w(prefix1 prefix2),

Put empty method definitions on a single line.
Open

def create_load_balancer(_name, _location, _resource_group, _frontend_ip_configuration_name, _subnet_id, _private_ip_address, _private_ip_allocation_method, _public_ip_address_id, _backend_address_pool_names, _load_balancing_rules, _probes, _inbound_nat_rules, _inbound_nat_pools)
end

Carriage return character detected.
Open

module Fog
module Network

Favor modifier if usage when having a single-line body. Another good alternative is the usage of control flow &&/||.
Open

if split_resource.count != 9

Carriage return character detected.
Open

module Fog
module Network

Use a guard clause instead of wrapping the code inside a conditional expression.
Open

unless security_rule_list.nil?

Use the return of the conditional for variable assignment and comparison.
Open

if async
response = @compute_mgmt_client.virtual_machines.get_async(resource_group, name, INSTANCE_VIEW)
else
response = @compute_mgmt_client.virtual_machines.get(resource_group, name, INSTANCE_VIEW)
end

Move address_space = Azure::ARM::Network::Models::AddressSpace.new out of the conditional.
Open

address_space = Azure::ARM::Network::Models::AddressSpace.new

Unused method argument - server_name. If it's necessary, use _ or _server_name as an argument name to indicate that it won't be used.
Open

def check_firewall_rule_exists(resource_group, server_name, rule_name)

Unnecessary spacing detected.
Open

rescue MsRestAzure::AzureOperationError => e

%w-literals should be delimited by [ and ].
Open

%w(ns1-05.azure-dns.com. ns2-05.azure-dns.net. ns3-05.azure-dns.org. ns4-05.azure-dns.info.),

Put empty method definitions on a single line.
Open

def delete_application_gateway(_resource_group, _name)
end
Severity
Category
Status
Source
Language