evalphobia/aws-sdk-go-v2-wrapper

View on GitHub
kms/type_enum.go

Summary

Maintainability
A
1 hr
Test Coverage

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

const (
    SigningAlgorithmSpecRsassaPssSha256      SigningAlgorithmSpec = SigningAlgorithmSpec(SDK.SigningAlgorithmSpecRsassaPssSha256)
    SigningAlgorithmSpecRsassaPssSha384      SigningAlgorithmSpec = SigningAlgorithmSpec(SDK.SigningAlgorithmSpecRsassaPssSha384)
    SigningAlgorithmSpecRsassaPssSha512      SigningAlgorithmSpec = SigningAlgorithmSpec(SDK.SigningAlgorithmSpecRsassaPssSha512)
    SigningAlgorithmSpecRsassaPkcs1V15Sha256 SigningAlgorithmSpec = SigningAlgorithmSpec(SDK.SigningAlgorithmSpecRsassaPkcs1V15Sha256)
Severity: Major
Found in kms/type_enum.go and 1 other location - About 1 hr to fix
pinpoint/type_enum.go on lines 118..128

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

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 KeyManagerType should have comment or be unexported
Open

type KeyManagerType string
Severity: Minor
Found in kms/type_enum.go by golint

exported type CustomerMasterKeySpec should have comment or be unexported
Open

type CustomerMasterKeySpec string
Severity: Minor
Found in kms/type_enum.go by golint

exported type KeyState should have comment or be unexported
Open

type KeyState string
Severity: Minor
Found in kms/type_enum.go by golint

exported const EncryptionAlgorithmSpecSymmetricDefault should have comment (or a comment on this block) or be unexported
Open

    EncryptionAlgorithmSpecSymmetricDefault EncryptionAlgorithmSpec = EncryptionAlgorithmSpec(SDK.EncryptionAlgorithmSpecSymmetricDefault)
Severity: Minor
Found in kms/type_enum.go by golint

exported type EncryptionAlgorithmSpec should have comment or be unexported
Open

type EncryptionAlgorithmSpec string
Severity: Minor
Found in kms/type_enum.go by golint

exported type KeyUsageType should have comment or be unexported
Open

type KeyUsageType string
Severity: Minor
Found in kms/type_enum.go by golint

exported const ExpirationModelTypeKeyMaterialExpires should have comment (or a comment on this block) or be unexported
Open

    ExpirationModelTypeKeyMaterialExpires       ExpirationModelType = ExpirationModelType(SDK.ExpirationModelTypeKeyMaterialExpires)
Severity: Minor
Found in kms/type_enum.go by golint

exported const SigningAlgorithmSpecRsassaPssSha256 should have comment (or a comment on this block) or be unexported
Open

    SigningAlgorithmSpecRsassaPssSha256      SigningAlgorithmSpec = SigningAlgorithmSpec(SDK.SigningAlgorithmSpecRsassaPssSha256)
Severity: Minor
Found in kms/type_enum.go by golint

exported const KeyStateEnabled should have comment (or a comment on this block) or be unexported
Open

    KeyStateEnabled         KeyState = KeyState(SDK.KeyStateEnabled)
Severity: Minor
Found in kms/type_enum.go by golint

exported type ExpirationModelType should have comment or be unexported
Open

type ExpirationModelType string
Severity: Minor
Found in kms/type_enum.go by golint

exported const CustomerMasterKeySpecRsa2048 should have comment (or a comment on this block) or be unexported
Open

    CustomerMasterKeySpecRsa2048          CustomerMasterKeySpec = CustomerMasterKeySpec(SDK.CustomerMasterKeySpecRsa2048)
Severity: Minor
Found in kms/type_enum.go by golint

exported const KeyManagerTypeAws should have comment (or a comment on this block) or be unexported
Open

    KeyManagerTypeAws      KeyManagerType = KeyManagerType(SDK.KeyManagerTypeAws)
Severity: Minor
Found in kms/type_enum.go by golint

exported const OriginTypeAwsKms should have comment (or a comment on this block) or be unexported
Open

    OriginTypeAwsKms      OriginType = OriginType(SDK.OriginTypeAwsKms)
Severity: Minor
Found in kms/type_enum.go by golint

exported type SigningAlgorithmSpec should have comment or be unexported
Open

type SigningAlgorithmSpec string
Severity: Minor
Found in kms/type_enum.go by golint

exported const KeyUsageTypeSignVerify should have comment (or a comment on this block) or be unexported
Open

    KeyUsageTypeSignVerify     KeyUsageType = KeyUsageType(SDK.KeyUsageTypeSignVerify)
Severity: Minor
Found in kms/type_enum.go by golint

exported type OriginType should have comment or be unexported
Open

type OriginType string
Severity: Minor
Found in kms/type_enum.go by golint

There are no issues that match your filters.

Category
Status