evalphobia/aws-sdk-go-v2-wrapper

View on GitHub
sqs/type.go

Summary

Maintainability
C
1 day
Test Coverage

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

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

    if r.DataType != "" {
        o.DataType = pointers.String(r.DataType)
Severity: Major
Found in sqs/type.go and 1 other location - About 2 hrs to fix
sqs/type.go on lines 272..292

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 205.

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 (r MessageSystemAttributeValue) ToSDK() SDK.MessageSystemAttributeValue {
    o := SDK.MessageSystemAttributeValue{}

    if r.DataType != "" {
        o.DataType = pointers.String(r.DataType)
Severity: Major
Found in sqs/type.go and 1 other location - About 2 hrs to fix
sqs/type.go on lines 210..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 205.

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 newSendMessageBatchResultEntry(o SDK.SendMessageBatchResultEntry) SendMessageBatchResultEntry {
    result := SendMessageBatchResultEntry{}

    if o.Id != nil {
        result.ID = *o.Id
Severity: Major
Found in sqs/type.go and 1 other location - About 1 hr to fix
pinpoint/type_endpoint.go on lines 295..316

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 187.

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 3 locations. Consider refactoring.
Open

func newBatchResultErrorEntry(o SDK.BatchResultErrorEntry) BatchResultErrorEntry {
    result := BatchResultErrorEntry{}

    if o.Code != nil {
        result.Code = *o.Code
Severity: Major
Found in sqs/type.go and 2 other locations - About 1 hr to fix
s3/type.go on lines 105..121
s3/type.go on lines 183..199

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 152.

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 newMessageAttributeValue(o SDK.MessageAttributeValue) MessageAttributeValue {
    result := MessageAttributeValue{}

    if o.DataType != nil {
        result.DataType = *o.DataType
Severity: Major
Found in sqs/type.go and 1 other location - About 1 hr to fix
sqs/type.go on lines 256..270

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 133.

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 newMessageSystemAttributeValue(o SDK.MessageSystemAttributeValue) MessageSystemAttributeValue {
    result := MessageSystemAttributeValue{}

    if o.DataType != nil {
        result.DataType = *o.DataType
Severity: Major
Found in sqs/type.go and 1 other location - About 1 hr to fix
sqs/type.go on lines 194..208

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 133.

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 DeleteMessageBatchRequestEntry) ToSDK() SDK.DeleteMessageBatchRequestEntry {
    o := SDK.DeleteMessageBatchRequestEntry{}

    if r.ID != "" {
        o.Id = pointers.String(r.ID)
Severity: Major
Found in sqs/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
ses/type.go on lines 87..97
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

exported type ChangeMessageVisibilityBatchRequestEntry should have comment or be unexported
Open

type ChangeMessageVisibilityBatchRequestEntry struct {
Severity: Minor
Found in sqs/type.go by golint

exported type Message should have comment or be unexported
Open

type Message struct {
Severity: Minor
Found in sqs/type.go by golint

exported method SendMessageBatchRequestEntry.ToSDK should have comment or be unexported
Open

func (r SendMessageBatchRequestEntry) ToSDK() SDK.SendMessageBatchRequestEntry {
Severity: Minor
Found in sqs/type.go by golint

exported type MessageAttributeValue should have comment or be unexported
Open

type MessageAttributeValue struct {
Severity: Minor
Found in sqs/type.go by golint

exported type MessageSystemAttributeValue should have comment or be unexported
Open

type MessageSystemAttributeValue struct {
Severity: Minor
Found in sqs/type.go by golint

exported type BatchResultErrorEntry should have comment or be unexported
Open

type BatchResultErrorEntry struct {
Severity: Minor
Found in sqs/type.go by golint

exported method ChangeMessageVisibilityBatchRequestEntry.ToSDK should have comment or be unexported
Open

func (r ChangeMessageVisibilityBatchRequestEntry) ToSDK() SDK.ChangeMessageVisibilityBatchRequestEntry {
Severity: Minor
Found in sqs/type.go by golint

exported type DeleteMessageBatchResultEntry should have comment or be unexported
Open

type DeleteMessageBatchResultEntry struct {
Severity: Minor
Found in sqs/type.go by golint

exported type ChangeMessageVisibilityBatchResultEntry should have comment or be unexported
Open

type ChangeMessageVisibilityBatchResultEntry struct {
Severity: Minor
Found in sqs/type.go by golint

exported type SendMessageBatchRequestEntry should have comment or be unexported
Open

type SendMessageBatchRequestEntry struct {
Severity: Minor
Found in sqs/type.go by golint

exported method MessageAttributeValue.ToSDK should have comment or be unexported
Open

func (r MessageAttributeValue) ToSDK() SDK.MessageAttributeValue {
Severity: Minor
Found in sqs/type.go by golint

exported type DeleteMessageBatchRequestEntry should have comment or be unexported
Open

type DeleteMessageBatchRequestEntry struct {
Severity: Minor
Found in sqs/type.go by golint

exported method MessageSystemAttributeValue.ToSDK should have comment or be unexported
Open

func (r MessageSystemAttributeValue) ToSDK() SDK.MessageSystemAttributeValue {
Severity: Minor
Found in sqs/type.go by golint

exported type SendMessageBatchResultEntry should have comment or be unexported
Open

type SendMessageBatchResultEntry struct {
Severity: Minor
Found in sqs/type.go by golint

exported method DeleteMessageBatchRequestEntry.ToSDK should have comment or be unexported
Open

func (r DeleteMessageBatchRequestEntry) ToSDK() SDK.DeleteMessageBatchRequestEntry {
Severity: Minor
Found in sqs/type.go by golint

There are no issues that match your filters.

Category
Status