evalphobia/aws-sdk-go-v2-wrapper

View on GitHub

Showing 151 of 1,082 total issues

Similar blocks of code found in 10 locations. Consider refactoring.
Open

func (r ObjectIdentifier) ToSDK() SDK.ObjectIdentifier {
    o := SDK.ObjectIdentifier{}

    if r.Key != "" {
        o.Key = pointers.String(r.Key)
Severity: Major
Found in s3/type.go and 9 other locations - About 40 mins to fix
dynamodb/type.go on lines 1133..1143
pinpoint/type_segment.go on lines 326..336
pinpointemail/type.go on lines 14..24
pinpointemail/type.go on lines 26..36
s3/type.go on lines 659..669
s3/type.go on lines 704..714
ses/type.go on lines 87..97
sqs/type.go on lines 100..110
ssm/type.go on lines 220..230

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 112.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 10 locations. Consider refactoring.
Open

func (r Tag) ToSDK() SDK.Tag {
    o := SDK.Tag{}

    if r.Key != "" {
        o.Key = pointers.String(r.Key)
Severity: Major
Found in pinpointemail/type.go and 9 other locations - About 40 mins to fix
dynamodb/type.go on lines 1133..1143
pinpoint/type_segment.go on lines 326..336
pinpointemail/type.go on lines 26..36
s3/type.go on lines 574..584
s3/type.go on lines 659..669
s3/type.go on lines 704..714
ses/type.go on lines 87..97
sqs/type.go on lines 100..110
ssm/type.go on lines 220..230

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 112.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 10 locations. Consider refactoring.
Open

func (r MessageTag) ToSDK() SDK.MessageTag {
    o := SDK.MessageTag{}

    if r.Name != "" {
        o.Name = pointers.String(r.Name)
Severity: Major
Found in ses/type.go and 9 other locations - About 40 mins to fix
dynamodb/type.go on lines 1133..1143
pinpoint/type_segment.go on lines 326..336
pinpointemail/type.go on lines 14..24
pinpointemail/type.go on lines 26..36
s3/type.go on lines 574..584
s3/type.go on lines 659..669
s3/type.go on lines 704..714
sqs/type.go on lines 100..110
ssm/type.go on lines 220..230

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 112.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 10 locations. Consider refactoring.
Open

func (r Tag) ToSDK() SDK.Tag {
    o := SDK.Tag{}

    if r.Key != "" {
        o.Key = pointers.String(r.Key)
Severity: Major
Found in s3/type.go and 9 other locations - About 40 mins to fix
dynamodb/type.go on lines 1133..1143
pinpoint/type_segment.go on lines 326..336
pinpointemail/type.go on lines 14..24
pinpointemail/type.go on lines 26..36
s3/type.go on lines 574..584
s3/type.go on lines 659..669
ses/type.go on lines 87..97
sqs/type.go on lines 100..110
ssm/type.go on lines 220..230

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 112.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 10 locations. Consider refactoring.
Open

func (r Tag) ToSDK() SDK.Tag {
    o := SDK.Tag{}

    if r.Key != "" {
        o.Key = pointers.String(r.Key)
Severity: Major
Found in dynamodb/type.go and 9 other locations - About 40 mins to fix
pinpoint/type_segment.go on lines 326..336
pinpointemail/type.go on lines 14..24
pinpointemail/type.go on lines 26..36
s3/type.go on lines 574..584
s3/type.go on lines 659..669
s3/type.go on lines 704..714
ses/type.go on lines 87..97
sqs/type.go on lines 100..110
ssm/type.go on lines 220..230

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 112.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 10 locations. Consider refactoring.
Open

func (r Owner) ToSDK() SDK.Owner {
    o := SDK.Owner{}

    if r.DisplayName != "" {
        o.DisplayName = pointers.String(r.DisplayName)
Severity: Major
Found in s3/type.go and 9 other locations - About 40 mins to fix
dynamodb/type.go on lines 1133..1143
pinpoint/type_segment.go on lines 326..336
pinpointemail/type.go on lines 14..24
pinpointemail/type.go on lines 26..36
s3/type.go on lines 574..584
s3/type.go on lines 704..714
ses/type.go on lines 87..97
sqs/type.go on lines 100..110
ssm/type.go on lines 220..230

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 112.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

func newBulkEmailDestinationStatus(o SDK.BulkEmailDestinationStatus) BulkEmailDestinationStatus {
    result := BulkEmailDestinationStatus{}

    if o.Error != nil {
        result.Error = *o.Error
Severity: Minor
Found in ses/type.go and 1 other location - About 40 mins to fix
s3/type.go on lines 734..745

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 111.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

func (svc *KMS) XEncryptBytes(ctx context.Context, key string, plainData []byte) (encryptedData []byte, err error) {
    result, err := svc.Encrypt(ctx, EncryptRequest{
        KeyID:     key,
        Plaintext: plainData,
    })
Severity: Minor
Found in kms/client_xapi.go and 1 other location - About 40 mins to fix
kms/client_xapi.go on lines 79..89

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 111.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

func newTransition(o SDK.Transition) Transition {
    result := Transition{}

    if o.Date != nil {
        result.Date = *o.Date
Severity: Minor
Found in s3/type.go and 1 other location - About 40 mins to fix
ses/type.go on lines 53..65

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 111.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

func (svc *KMS) XReEncryptBytes(ctx context.Context, destinationKey string, encryptedData []byte) (resultEncryptedData []byte, err error) {
    result, err := svc.ReEncrypt(ctx, ReEncryptRequest{
        DestinationKeyID: destinationKey,
        CiphertextBlob:   encryptedData,
    })
Severity: Minor
Found in kms/client_xapi.go and 1 other location - About 40 mins to fix
kms/client_xapi.go on lines 31..41

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 111.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 7 locations. Consider refactoring.
Open

func newTemplate(o *SDK.Template) Template {
    result := Template{}
    if o == nil {
        return result
    }
Severity: Major
Found in pinpoint/type_campaign.go and 6 other locations - About 40 mins to fix
athena/type.go on lines 111..124
pinpoint/type_campaign.go on lines 644..657
pinpoint/type_segment.go on lines 311..324
pinpoint/type_template.go on lines 228..241
s3/type.go on lines 644..657
ses/type.go on lines 152..165

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 109.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 7 locations. Consider refactoring.
Open

func newTemplateMetadata(o *SDK.TemplateMetadata) TemplateMetadata {
    result := TemplateMetadata{}
    if o == nil {
        return result
    }
Severity: Major
Found in ses/type.go and 6 other locations - About 40 mins to fix
athena/type.go on lines 111..124
pinpoint/type_campaign.go on lines 644..657
pinpoint/type_campaign.go on lines 764..777
pinpoint/type_segment.go on lines 311..324
pinpoint/type_template.go on lines 228..241
s3/type.go on lines 644..657

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 109.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 7 locations. Consider refactoring.
Open

func newMessageBody(o *SDK.MessageBody) MessageBody {
    result := MessageBody{}
    if o == nil {
        return result
    }
Severity: Major
Found in pinpoint/type_template.go and 6 other locations - About 40 mins to fix
athena/type.go on lines 111..124
pinpoint/type_campaign.go on lines 644..657
pinpoint/type_campaign.go on lines 764..777
pinpoint/type_segment.go on lines 311..324
s3/type.go on lines 644..657
ses/type.go on lines 152..165

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 109.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 7 locations. Consider refactoring.
Open

func newQuietTime(o *SDK.QuietTime) QuietTime {
    result := QuietTime{}
    if o == nil {
        return result
    }
Severity: Major
Found in pinpoint/type_campaign.go and 6 other locations - About 40 mins to fix
athena/type.go on lines 111..124
pinpoint/type_campaign.go on lines 764..777
pinpoint/type_segment.go on lines 311..324
pinpoint/type_template.go on lines 228..241
s3/type.go on lines 644..657
ses/type.go on lines 152..165

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 109.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 7 locations. Consider refactoring.
Open

func NewQueryExecutionContext(o *SDK.QueryExecutionContext) QueryExecutionContext {
    r := QueryExecutionContext{}
    if o == nil {
        return r
    }
Severity: Major
Found in athena/type.go and 6 other locations - About 40 mins to fix
pinpoint/type_campaign.go on lines 644..657
pinpoint/type_campaign.go on lines 764..777
pinpoint/type_segment.go on lines 311..324
pinpoint/type_template.go on lines 228..241
s3/type.go on lines 644..657
ses/type.go on lines 152..165

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 109.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 7 locations. Consider refactoring.
Open

func newSegmentReference(o *SDK.SegmentReference) SegmentReference {
    result := SegmentReference{}
    if o == nil {
        return result
    }
Severity: Major
Found in pinpoint/type_segment.go and 6 other locations - About 40 mins to fix
athena/type.go on lines 111..124
pinpoint/type_campaign.go on lines 644..657
pinpoint/type_campaign.go on lines 764..777
pinpoint/type_template.go on lines 228..241
s3/type.go on lines 644..657
ses/type.go on lines 152..165

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 109.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 7 locations. Consider refactoring.
Open

func newOwner(o *SDK.Owner) Owner {
    result := Owner{}
    if o == nil {
        return result
    }
Severity: Major
Found in s3/type.go and 6 other locations - About 40 mins to fix
athena/type.go on lines 111..124
pinpoint/type_campaign.go on lines 644..657
pinpoint/type_campaign.go on lines 764..777
pinpoint/type_segment.go on lines 311..324
pinpoint/type_template.go on lines 228..241
ses/type.go on lines 152..165

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 109.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

func NewUpdateEndpointsBatchResult(o *SDK.UpdateEndpointsBatchResponse) *UpdateEndpointsBatchResult {
    result := &UpdateEndpointsBatchResult{}
    if o == nil {
        return result
    }
Severity: Minor
Found in pinpoint/client_op_update_endpoints_batch.go and 1 other location - About 40 mins to fix
pinpoint/client_op_update_endpoint.go on lines 51..63

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 108.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

func (svc *SSM) XPutParameterSecrure(ctx context.Context, name, value string) (alreadyExists bool, err error) {
    result, err := svc.PutParameter(ctx, PutParameterRequest{
        Name:  name,
        Value: value,
        Type:  ParameterTypeSecureString,
Severity: Minor
Found in ssm/client_xapi.go and 1 other location - About 40 mins to fix
ssm/client_xapi.go on lines 57..67

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 108.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

func NewUpdateEndpointResult(o *SDK.UpdateEndpointResponse) *UpdateEndpointResult {
    result := &UpdateEndpointResult{}
    if o == nil {
        return result
    }
Severity: Minor
Found in pinpoint/client_op_update_endpoint.go and 1 other location - About 40 mins to fix
pinpoint/client_op_update_endpoints_batch.go on lines 47..59

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 108.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Severity
Category
Status
Source
Language