fog/fog-azure-rm

View on GitHub

Showing 207 of 528 total issues

Method get_vault has 28 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        def get_vault(*)
          vault = {
            'id' => '/subscriptions/<AZURE_SUBSCRIPTION_ID>/resourceGroups/RubySDKTest_azure_mgmt_kv/providers/Microsoft.KeyVault/vaults/sampleVault758347',
            'name' => 'sampleVault758347',
            'type' => 'Microsoft.KeyVault/vaults',
Severity: Minor
Found in lib/fog/azurerm/requests/key_vault/get_vault.rb - About 1 hr to fix

    Method remove_subnets_from_virtual_network has 28 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            def remove_subnets_from_virtual_network(*)
              virtual_network = {
                'id' => '/subscriptions/########-####-####-####-############/resourceGroups/fog-rg/providers/Microsoft.Network/virtualNetworks/fog-vnet',
                'name' => 'fog-vnet',
                'type' => 'Microsoft.Network/virtualNetworks',

      Method create_or_update_vault has 28 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              def create_or_update_vault(*)
                vault = {
                  'id' => '/subscriptions/<AZURE_SUBSCRIPTION_ID>/resourceGroups/RubySDKTest_azure_mgmt_kv/providers/Microsoft.KeyVault/vaults/sampleVault758347',
                  'name' => 'sampleVault758347',
                  'type' => 'Microsoft.KeyVault/vaults',
      Severity: Minor
      Found in lib/fog/azurerm/requests/key_vault/create_or_update_vault.rb - About 1 hr to fix

        Method define_application_gateway has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
        Open

                def define_application_gateway(gateway_params)
                  application_gateway = Azure::ARM::Network::Models::ApplicationGateway.new
                  application_gateway.name = gateway_params[:name]
                  application_gateway.location = gateway_params[:location]
        
        

        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_probes has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
        Open

                def validate_probes(probes)
                  if probes.is_a?(Array)
                    if probes.any?
                      probes.each do |prb|
                        if prb.is_a?(Hash)
        Severity: Minor
        Found in lib/fog/azurerm/models/network/load_balancer.rb - About 1 hr to fix

        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_inbound_nat_rules has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
        Open

                def validate_inbound_nat_rules(inbound_nat_rules)
                  if inbound_nat_rules.is_a?(Array)
                    if inbound_nat_rules.any?
                      inbound_nat_rules.each do |inr|
                        if inr.is_a?(Hash)
        Severity: Minor
        Found in lib/fog/azurerm/models/network/load_balancer.rb - About 1 hr to fix

        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_configurations has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
        Open

                def validate_frontend_ip_configurations(frontend_ip_configurations)
                  if frontend_ip_configurations.is_a?(Array)
                    if frontend_ip_configurations.any?
                      frontend_ip_configurations.each do |frontend_ip_configuration|
                        if frontend_ip_configuration.is_a?(Hash)
        Severity: Minor
        Found in lib/fog/azurerm/models/application_gateway/gateway.rb - About 1 hr to fix

        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_ssl_certificates has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
        Open

                def validate_ssl_certificates(ssl_certificates)
                  if ssl_certificates.is_a?(Array)
                    if ssl_certificates.any?
                      ssl_certificates.each do |ssl_certificate|
                        if ssl_certificate.is_a?(Hash)
        Severity: Minor
        Found in lib/fog/azurerm/models/application_gateway/gateway.rb - About 1 hr to fix

        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_backend_address_pools has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
        Open

                def validate_backend_address_pools(backend_address_pools)
                  if backend_address_pools.is_a?(Array)
                    if backend_address_pools.any?
                      backend_address_pools.each do |backend_address_pool|
                        if backend_address_pool.is_a?(Hash)
        Severity: Minor
        Found in lib/fog/azurerm/models/application_gateway/gateway.rb - About 1 hr to fix

        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_ports has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
        Open

                def validate_frontend_ports(frontend_ports)
                  if frontend_ports.is_a?(Array)
                    if frontend_ports.any?
                      frontend_ports.each do |frontend_port|
                        if frontend_port.is_a?(Hash)
        Severity: Minor
        Found in lib/fog/azurerm/models/application_gateway/gateway.rb - About 1 hr to fix

        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 save has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
        Open

                def save(async = false)
                  requires :name, :location, :resource_group, :vm_size, :username, :network_interface_card_ids
                  requires :publisher, :offer, :sku, :version if vhd_path.nil? && image_ref.nil?
                  requires :storage_account_name if managed_disk_storage_type.nil?
                  requires :managed_disk_storage_type if storage_account_name.nil?
        Severity: Minor
        Found in lib/fog/azurerm/models/compute/server.rb - About 1 hr to fix

        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_gateway_ip_configurations has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
        Open

                def validate_gateway_ip_configurations(gateway_ip_configurations)
                  if gateway_ip_configurations.is_a?(Array)
                    if gateway_ip_configurations.any?
                      gateway_ip_configurations.each do |gateway_ip_configuration|
                        if gateway_ip_configuration.is_a?(Hash)
        Severity: Minor
        Found in lib/fog/azurerm/models/application_gateway/gateway.rb - About 1 hr to fix

        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_http_listeners has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
        Open

                def validate_http_listeners(http_listeners)
                  if http_listeners.is_a?(Array)
                    if http_listeners.any?
                      http_listeners.each do |http_listener|
                        if http_listener.is_a?(Hash)
        Severity: Minor
        Found in lib/fog/azurerm/models/application_gateway/gateway.rb - About 1 hr to fix

        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_inbound_nat_pools has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
        Open

                def validate_inbound_nat_pools(inbound_nat_pools)
                  if inbound_nat_pools.is_a?(Array)
                    if inbound_nat_pools.any?
                      inbound_nat_pools.each do |inp|
                        if inp.is_a?(Hash)
        Severity: Minor
        Found in lib/fog/azurerm/models/network/load_balancer.rb - About 1 hr to fix

        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_probes has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
        Open

                def validate_probes(probes)
                  if probes.is_a?(Array)
                    if probes.any?
                      probes.each do |probe|
                        if probe.is_a?(Hash)
        Severity: Minor
        Found in lib/fog/azurerm/models/application_gateway/gateway.rb - About 1 hr to fix

        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_request_routing_rules has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
        Open

                def validate_request_routing_rules(request_routing_rules)
                  if request_routing_rules.is_a?(Array)
                    if request_routing_rules.any?
                      request_routing_rules.each do |request_routing_rule|
                        if request_routing_rule.is_a?(Hash)
        Severity: Minor
        Found in lib/fog/azurerm/models/application_gateway/gateway.rb - About 1 hr to fix

        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_configurations has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
        Open

                def validate_frontend_ip_configurations(frontend_ip_configurations)
                  if frontend_ip_configurations.is_a?(Array)
                    if frontend_ip_configurations.any?
                      frontend_ip_configurations.each do |frontend_ip_configuration|
                        if frontend_ip_configuration.is_a?(Hash)
        Severity: Minor
        Found in lib/fog/azurerm/models/network/load_balancer.rb - About 1 hr to fix

        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_backend_http_settings_list has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
        Open

                def validate_backend_http_settings_list(backend_http_settings_list)
                  if backend_http_settings_list.is_a?(Array)
                    if backend_http_settings_list.any?
                      backend_http_settings_list.each do |backend_http_settings|
                        if backend_http_settings.is_a?(Hash)
        Severity: Minor
        Found in lib/fog/azurerm/models/application_gateway/gateway.rb - About 1 hr to fix

        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_load_balancing_rules has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
        Open

                def validate_load_balancing_rules(load_balancing_rules)
                  if load_balancing_rules.is_a?(Array)
                    if load_balancing_rules.any?
                      load_balancing_rules.each do |lbr|
                        if lbr.is_a?(Hash)
        Severity: Minor
        Found in lib/fog/azurerm/models/network/load_balancer.rb - About 1 hr to fix

        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_url_path_maps has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
        Open

                def validate_url_path_maps(url_path_maps)
                  if url_path_maps.is_a?(Array)
                    if url_path_maps.any?
                      url_path_maps.each do |url_path_map|
                        if url_path_map.is_a?(Hash)
        Severity: Minor
        Found in lib/fog/azurerm/models/application_gateway/gateway.rb - About 1 hr to fix

        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

        Severity
        Category
        Status
        Source
        Language