evalphobia/aws-sdk-go-v2-wrapper

View on GitHub

Showing 151 of 1,082 total issues

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

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

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

const (
    StorageClassStandard           StorageClass = StorageClass(SDK.StorageClassStandard)
    StorageClassReducedRedundancy  StorageClass = StorageClass(SDK.StorageClassReducedRedundancy)
    StorageClassStandardIa         StorageClass = StorageClass(SDK.StorageClassStandardIa)
    StorageClassOnezoneIa          StorageClass = StorageClass(SDK.StorageClassOnezoneIa)
Severity: Major
Found in s3/type_enum.go and 3 other locations - About 35 mins to fix
dynamodb/type_enum.go on lines 325..333
s3/type_enum.go on lines 119..127
s3/type_enum.go on lines 195..203

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

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

const (
    ObjectCannedACLPrivate                ObjectCannedACL = ObjectCannedACL(SDK.ObjectCannedACLPrivate)
    ObjectCannedACLPublicRead             ObjectCannedACL = ObjectCannedACL(SDK.ObjectCannedACLPublicRead)
    ObjectCannedACLPublicReadWrite        ObjectCannedACL = ObjectCannedACL(SDK.ObjectCannedACLPublicReadWrite)
    ObjectCannedACLAuthenticatedRead      ObjectCannedACL = ObjectCannedACL(SDK.ObjectCannedACLAuthenticatedRead)
Severity: Major
Found in s3/type_enum.go and 3 other locations - About 35 mins to fix
dynamodb/type_enum.go on lines 325..333
s3/type_enum.go on lines 195..203
s3/type_enum.go on lines 305..313

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

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

const (
    ObjectStorageClassStandard           ObjectStorageClass = ObjectStorageClass(SDK.ObjectStorageClassStandard)
    ObjectStorageClassReducedRedundancy  ObjectStorageClass = ObjectStorageClass(SDK.ObjectStorageClassReducedRedundancy)
    ObjectStorageClassGlacier            ObjectStorageClass = ObjectStorageClass(SDK.ObjectStorageClassGlacier)
    ObjectStorageClassStandardIa         ObjectStorageClass = ObjectStorageClass(SDK.ObjectStorageClassStandardIa)
Severity: Major
Found in s3/type_enum.go and 3 other locations - About 35 mins to fix
dynamodb/type_enum.go on lines 325..333
s3/type_enum.go on lines 119..127
s3/type_enum.go on lines 305..313

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

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

const (
    TableStatusCreating                          TableStatus = TableStatus(SDK.TableStatusCreating)
    TableStatusUpdating                          TableStatus = TableStatus(SDK.TableStatusUpdating)
    TableStatusDeleting                          TableStatus = TableStatus(SDK.TableStatusDeleting)
    TableStatusActive                            TableStatus = TableStatus(SDK.TableStatusActive)
Severity: Major
Found in dynamodb/type_enum.go and 3 other locations - About 35 mins to fix
s3/type_enum.go on lines 119..127
s3/type_enum.go on lines 195..203
s3/type_enum.go on lines 305..313

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

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

    if r.XConditions.hasValue() {
        expr, err := r.XConditions.Build()
        if err != nil {
            return nil, err
        }
Severity: Minor
Found in dynamodb/client_op_item_scan.go and 1 other location - About 35 mins to fix
dynamodb/client_op_item_update.go on lines 83..92

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

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

    if r.XConditions.hasValue() {
        expr, err := r.XConditions.Build()
        if err != nil {
            return nil, err
        }
Severity: Minor
Found in dynamodb/client_op_item_update.go and 1 other location - About 35 mins to fix
dynamodb/client_op_item_scan.go on lines 100..109

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

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

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

func TestSetLogger(t *testing.T) {
    is := is.NewRelaxed(t)
    svc := getTestClient(t)
    is.Equal(log.DefaultLogger, svc.logger)

Severity: Minor
Found in s3/client_test.go and 1 other location - About 35 mins to fix
dynamodb/client_test.go on lines 50..58

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

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

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

func TestSetLogger(t *testing.T) {
    is := is.NewRelaxed(t)
    svc := getTestClient(t)
    is.Equal(log.DefaultLogger, svc.logger)

Severity: Minor
Found in dynamodb/client_test.go and 1 other location - About 35 mins to fix
s3/client_test.go on lines 50..58

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

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 NewPutParameterResult(o *SDK.PutParameterResponse) *PutParameterResult {
    result := &PutParameterResult{}
    if o == nil {
        return result
    }
Severity: Minor
Found in ssm/client_op_put_parameter.go and 1 other location - About 30 mins to fix
s3/client_op_object_get_object_tagging.go on lines 55..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 101.

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 NewGetObjectTaggingResult(output *SDK.GetObjectTaggingResponse) *GetObjectTaggingResult {
    r := &GetObjectTaggingResult{}
    if output == nil {
        return r
    }
Severity: Minor
Found in s3/client_op_object_get_object_tagging.go and 1 other location - About 30 mins to fix
ssm/client_op_put_parameter.go on lines 96..107

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

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