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)
}
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)
}
File type.go
has 1027 lines of code (exceeds 500 allowed). Consider refactoring. Open
package dynamodb
import (
"fmt"
"strconv"
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)
}
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)
}
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"
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()
- 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
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)
}
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)
}
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)
}
File type.go
has 646 lines of code (exceeds 500 allowed). Consider refactoring. Open
package s3
import (
"time"
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)
}
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)
}
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,
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
}
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)
}
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)
}
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,
- 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 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)
}
- 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
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
}