Showing 630 of 1,221 total issues

Method create_route has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

        def create_route(route_table_id, destination_cidr_block, internet_gateway_id=nil, instance_id=nil, network_interface_id=nil)
Severity: Minor
Found in lib/fog/aws/requests/compute/create_route.rb - About 35 mins to fix

    Method register_image has 5 arguments (exceeds 4 allowed). Consider refactoring.
    Open

            def register_image(name, description, location, block_devices=[], options={})
    Severity: Minor
    Found in lib/fog/aws/requests/compute/register_image.rb - About 35 mins to fix

      Method assume_role_with_saml has 5 arguments (exceeds 4 allowed). Consider refactoring.
      Open

              def assume_role_with_saml(role_arn, principal_arn, saml_assertion, policy=nil, duration=3600)
      Severity: Minor
      Found in lib/fog/aws/requests/sts/assume_role_with_saml.rb - About 35 mins to fix

        Method create_image has 5 arguments (exceeds 4 allowed). Consider refactoring.
        Open

                def create_image(instance_id, name, description, no_reboot = false, options = {})
        Severity: Minor
        Found in lib/fog/aws/requests/compute/create_image.rb - About 35 mins to fix

          Method complete_multipart_upload has 5 arguments (exceeds 4 allowed). Consider refactoring.
          Open

                  def complete_multipart_upload(vault_name, upload_id, total_size, tree_hash, options={})
          Severity: Minor
          Found in lib/fog/aws/requests/glacier/complete_multipart_upload.rb - About 35 mins to fix

            Method register_image has 5 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                    def register_image(name, description, location, block_devices=[], options={})
            Severity: Minor
            Found in lib/fog/aws/requests/compute/register_image.rb - About 35 mins to fix

              Method create_image has 5 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                      def create_image(instance_id, name, description, no_reboot = false, options={})
              Severity: Minor
              Found in lib/fog/aws/requests/compute/create_image.rb - About 35 mins to fix

                Method put_object_url has 5 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                        def put_object_url(bucket_name, object_name, expires, headers = {}, options = {})
                Severity: Minor
                Found in lib/fog/aws/requests/storage/put_object_url.rb - About 35 mins to fix

                  Method assume_role has 5 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                          def assume_role(role_session_name, role_arn, external_id=nil, policy=nil, duration=3600)
                  Severity: Minor
                  Found in lib/fog/aws/requests/sts/assume_role.rb - About 35 mins to fix

                    Method copy_image has 5 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                            def copy_image(source_image_id, source_region, name = nil, description = nil, client_token = nil)
                    Severity: Minor
                    Found in lib/fog/aws/requests/compute/copy_image.rb - About 35 mins to fix

                      Method put_scaling_policy has 5 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                              def put_scaling_policy(adjustment_type, auto_scaling_group_name, policy_name, scaling_adjustment, options = {})
                      Severity: Minor
                      Found in lib/fog/aws/requests/auto_scaling/put_scaling_policy.rb - About 35 mins to fix

                        Method put_scaling_policy has 5 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                                def put_scaling_policy(adjustment_type, auto_scaling_group_name, policy_name, scaling_adjustment, options = {})
                        Severity: Minor
                        Found in lib/fog/aws/requests/auto_scaling/put_scaling_policy.rb - About 35 mins to fix

                          Method copy_image has 5 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

                                  def copy_image(source_image_id, source_region, name = nil, description = nil, client_token = nil)
                          Severity: Minor
                          Found in lib/fog/aws/requests/compute/copy_image.rb - About 35 mins to fix

                            Method all has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                            Open

                                    def all(options={})
                                      application_filter = []
                                      if options.key?('ApplicationName')
                                        application_filter << options['ApplicationName']
                                      end
                            Severity: Minor
                            Found in lib/fog/aws/models/beanstalk/templates.rb - About 35 mins 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 _request has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                            Open

                                    def _request(params, &block)
                                      @connection.request(params, &block)
                                    rescue Excon::Errors::HTTPStatusError => error
                                      match = Fog::AWS::Errors.match_error(error)
                            
                            
                            Severity: Minor
                            Found in lib/fog/aws/dns.rb - About 35 mins 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 end_element has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                            Open

                                      def end_element(name)
                                        super
                                        case name
                                        when 'TargetNodeType', 'TargetClusterType', 'Status'
                                          @response[name] = value
                            Severity: Minor
                            Found in lib/fog/aws/parsers/redshift/describe_resize.rb - About 35 mins 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 reload has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                            Open

                                    def reload
                                      if group_id.nil?
                                        super
                                        service.delete_security_group(name)
                                      else
                            Severity: Minor
                            Found in lib/fog/aws/models/compute/security_group.rb - About 35 mins 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 end_element has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                            Open

                                      def end_element(name)
                                        case name
                                        when 'Date'
                                          @event[name] = DateTime.parse(value.strip)
                                        when 'Message', 'SourceIdentifier', 'SourceType'
                            Severity: Minor
                            Found in lib/fog/aws/parsers/elasticache/event_list.rb - About 35 mins 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 end_element has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                            Open

                                      def end_element(name)
                                        case name
                                        when 'member'
                                          if @in_availability_zones && @in_load_balancer_addresses
                                            @availability_zone['LoadBalancerAddresses'] << @load_balancer_addresses
                            Severity: Minor
                            Found in lib/fog/aws/parsers/elbv2/create_load_balancer.rb - About 35 mins 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 7 (exceeds 5 allowed). Consider refactoring.
                            Open

                                    def save
                                      requires :id, :load_balancer_id
                                      args = [load_balancer_id, id]
                            
                                      if cookie_stickiness
                            Severity: Minor
                            Found in lib/fog/aws/models/elb/policy.rb - About 35 mins 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