evalphobia/aws-sdk-go-v2-wrapper

View on GitHub

Showing 41 of 1,082 total issues

SSM has 122 methods (exceeds 20 allowed). Consider refactoring.
Open

func (svc *SSM) RawAddTagsToResource(ctx context.Context, in *SDK.AddTagsToResourceInput) (*SDK.AddTagsToResourceResponse, error) {
    return svc.client.AddTagsToResourceRequest(in).Send(ctx)
}
Severity: Major
Found in ssm/client__raw_api.go - About 2 days to fix

    Pinpoint has 112 methods (exceeds 20 allowed). Consider refactoring.
    Open

    func (svc *Pinpoint) RawCreateApp(ctx context.Context, in *SDK.CreateAppInput) (*SDK.CreateAppResponse, error) {
        return svc.client.CreateAppRequest(in).Send(ctx)
    }
    Severity: Major
    Found in pinpoint/client__raw_api.go - About 2 days to fix

      File type.go has 1027 lines of code (exceeds 500 allowed). Consider refactoring.
      Open

      package dynamodb
      
      import (
          "fmt"
          "strconv"
      Severity: Major
      Found in dynamodb/type.go - About 1 day to fix

        S3 has 87 methods (exceeds 20 allowed). Consider refactoring.
        Open

        func (svc *S3) RawAbortMultipartUpload(ctx context.Context, in *SDK.AbortMultipartUploadInput) (*SDK.AbortMultipartUploadResponse, error) {
            return svc.client.AbortMultipartUploadRequest(in).Send(ctx)
        }
        Severity: Major
        Found in s3/client__raw_api.go - About 1 day to fix

          SES has 71 methods (exceeds 20 allowed). Consider refactoring.
          Open

          func (svc *SES) RawCloneReceiptRuleSet(ctx context.Context, in *SDK.CloneReceiptRuleSetInput) (*SDK.CloneReceiptRuleSetResponse, error) {
              return svc.client.CloneReceiptRuleSetRequest(in).Send(ctx)
          }
          Severity: Major
          Found in ses/client__raw_api.go - About 1 day to fix

            File type_campaign.go has 804 lines of code (exceeds 500 allowed). Consider refactoring.
            Open

            package pinpoint
            
            import (
                SDK "github.com/aws/aws-sdk-go-v2/service/pinpoint"
                "github.com/evalphobia/aws-sdk-go-v2-wrapper/private/pointers"
            Severity: Major
            Found in pinpoint/type_campaign.go - About 1 day to fix

              Method XConditions.Build has a Cognitive Complexity of 61 (exceeds 20 allowed). Consider refactoring.
              Open

              func (x XConditions) Build() (expression.Expression, error) {
                  b := expression.NewBuilder()
              
                  if len(x.KeyConditions) != 0 {
                      kc, err := x.KeyConditions[0].KeyCondition()
              Severity: Minor
              Found in dynamodb/xtype_condition.go - About 7 hrs 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

              KMS has 46 methods (exceeds 20 allowed). Consider refactoring.
              Open

              func (svc *KMS) RawCancelKeyDeletion(ctx context.Context, in *SDK.CancelKeyDeletionInput) (*SDK.CancelKeyDeletionResponse, error) {
                  return svc.client.CancelKeyDeletionRequest(in).Send(ctx)
              }
              Severity: Minor
              Found in kms/client__raw_api.go - About 6 hrs to fix

                PinpointEmail has 42 methods (exceeds 20 allowed). Consider refactoring.
                Open

                func (svc *PinpointEmail) RawCreateConfigurationSet(ctx context.Context, in *SDK.CreateConfigurationSetInput) (*SDK.CreateConfigurationSetResponse, error) {
                    return svc.client.CreateConfigurationSetRequest(in).Send(ctx)
                }
                Severity: Minor
                Found in pinpointemail/client__raw_api.go - About 5 hrs to fix

                  CloudwatchLogs has 42 methods (exceeds 20 allowed). Consider refactoring.
                  Open

                  func (svc *CloudwatchLogs) RawAssociateKmsKey(ctx context.Context, in *SDK.AssociateKmsKeyInput) (*SDK.AssociateKmsKeyResponse, error) {
                      return svc.client.AssociateKmsKeyRequest(in).Send(ctx)
                  }
                  Severity: Minor
                  Found in cloudwatchlogs/client__raw_api.go - About 5 hrs to fix

                    File type.go has 646 lines of code (exceeds 500 allowed). Consider refactoring.
                    Open

                    package s3
                    
                    import (
                        "time"
                    
                    
                    Severity: Minor
                    Found in s3/type.go - About 5 hrs to fix

                      DynamoDB has 41 methods (exceeds 20 allowed). Consider refactoring.
                      Open

                      func (svc *DynamoDB) RawBatchGetItem(ctx context.Context, in *SDK.BatchGetItemInput) (*SDK.BatchGetItemResponse, error) {
                          return svc.client.BatchGetItemRequest(in).Send(ctx)
                      }
                      Severity: Minor
                      Found in dynamodb/client__raw_api.go - About 5 hrs to fix

                        Method CopyObjectRequest.ToInput has 106 lines of code (exceeds 50 allowed). Consider refactoring.
                        Open

                        func (r CopyObjectRequest) ToInput() *SDK.CopyObjectInput {
                            in := &SDK.CopyObjectInput{}
                            if r.Bucket != "" {
                                in.Bucket = pointers.String(r.Bucket)
                            }
                        Severity: Major
                        Found in s3/client_op_object_copy.go - About 3 hrs to fix

                          Method XSendRawEmailRequest.ToRequest has 102 lines of code (exceeds 50 allowed). Consider refactoring.
                          Open

                          func (r XSendRawEmailRequest) ToRequest() (SendRawEmailRequest, error) {
                              req := SendRawEmailRequest{
                                  ConfigurationSetName: r.ConfigurationSetName,
                                  Destinations:         r.To,
                                  FromARN:              r.FromARN,
                          Severity: Major
                          Found in ses/client_xapi_send_raw_email.go - About 3 hrs to fix

                            Function NewGetObjectResult has 94 lines of code (exceeds 50 allowed). Consider refactoring.
                            Open

                            func NewGetObjectResult(output *SDK.GetObjectResponse) *GetObjectResult {
                                r := &GetObjectResult{}
                                if output == nil {
                                    return r
                                }
                            Severity: Major
                            Found in s3/client_op_object_get.go - About 2 hrs to fix

                              Method PutObjectRequest.ToInput has 92 lines of code (exceeds 50 allowed). Consider refactoring.
                              Open

                              func (r PutObjectRequest) ToInput() *SDK.PutObjectInput {
                                  in := &SDK.PutObjectInput{}
                                  if r.Bucket != "" {
                                      in.Bucket = pointers.String(r.Bucket)
                                  }
                              Severity: Major
                              Found in s3/client_op_object_put.go - About 2 hrs to fix

                                Athena has 24 methods (exceeds 20 allowed). Consider refactoring.
                                Open

                                func (svc *Athena) RawBatchGetNamedQuery(ctx context.Context, in *SDK.BatchGetNamedQueryInput) (*SDK.BatchGetNamedQueryResponse, error) {
                                    return svc.client.BatchGetNamedQueryRequest(in).Send(ctx)
                                }
                                Severity: Minor
                                Found in athena/client__raw_api.go - About 2 hrs to fix

                                  Method XSendRawEmailRequest.ToRequest has a Cognitive Complexity of 33 (exceeds 20 allowed). Consider refactoring.
                                  Open

                                  func (r XSendRawEmailRequest) ToRequest() (SendRawEmailRequest, error) {
                                      req := SendRawEmailRequest{
                                          ConfigurationSetName: r.ConfigurationSetName,
                                          Destinations:         r.To,
                                          FromARN:              r.FromARN,
                                  Severity: Minor
                                  Found in ses/client_xapi_send_raw_email.go - About 2 hrs 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 CopyObjectRequest.ToInput has a Cognitive Complexity of 33 (exceeds 20 allowed). Consider refactoring.
                                  Open

                                  func (r CopyObjectRequest) ToInput() *SDK.CopyObjectInput {
                                      in := &SDK.CopyObjectInput{}
                                      if r.Bucket != "" {
                                          in.Bucket = pointers.String(r.Bucket)
                                      }
                                  Severity: Minor
                                  Found in s3/client_op_object_copy.go - About 2 hrs 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

                                  Function NewHeadObjectResult has 85 lines of code (exceeds 50 allowed). Consider refactoring.
                                  Open

                                  func NewHeadObjectResult(output *SDK.HeadObjectResponse) *HeadObjectResult {
                                      r := &HeadObjectResult{}
                                      if output == nil {
                                          return r
                                      }
                                  Severity: Major
                                  Found in s3/client_op_object_head.go - About 2 hrs to fix
                                    Severity
                                    Category
                                    Status
                                    Source
                                    Language