evalphobia/aws-sdk-go-v2-wrapper

View on GitHub
dynamodb/type_enum.go

Summary

Maintainability
A
35 mins
Test Coverage

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

exported method ComparisonOperator.IsEq should have comment or be unexported
Open

func (v ComparisonOperator) IsEq() bool {
Severity: Minor
Found in dynamodb/type_enum.go by golint

exported method ComparisonOperator.IsIn should have comment or be unexported
Open

func (v ComparisonOperator) IsIn() bool {
Severity: Minor
Found in dynamodb/type_enum.go by golint

exported method ComparisonOperator.IsBetween should have comment or be unexported
Open

func (v ComparisonOperator) IsBetween() bool {
Severity: Minor
Found in dynamodb/type_enum.go by golint

exported method ComparisonOperator.IsBeginsWith should have comment or be unexported
Open

func (v ComparisonOperator) IsBeginsWith() bool {
Severity: Minor
Found in dynamodb/type_enum.go by golint

exported method ConditionalOperator.IsAnd should have comment or be unexported
Open

func (v ConditionalOperator) IsAnd() bool {
Severity: Minor
Found in dynamodb/type_enum.go by golint

exported method IndexStatus.IsActive should have comment or be unexported
Open

func (v IndexStatus) IsActive() bool {
Severity: Minor
Found in dynamodb/type_enum.go by golint

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

    ProjectionTypeAll      ProjectionType = ProjectionType(SDK.ProjectionTypeAll)
Severity: Minor
Found in dynamodb/type_enum.go by golint

exported type ReplicaStatus should have comment or be unexported
Open

type ReplicaStatus string
Severity: Minor
Found in dynamodb/type_enum.go by golint

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

    ReturnConsumedCapacityIndexes ReturnConsumedCapacity = ReturnConsumedCapacity(SDK.ReturnConsumedCapacityIndexes)
Severity: Minor
Found in dynamodb/type_enum.go by golint

exported method Select.IsCount should have comment or be unexported
Open

func (v Select) IsCount() bool {
Severity: Minor
Found in dynamodb/type_enum.go by golint

exported method SSEStatus.IsUpdating should have comment or be unexported
Open

func (v SSEStatus) IsUpdating() bool {
Severity: Minor
Found in dynamodb/type_enum.go by golint

exported method ProjectionType.IsKeysOnly should have comment or be unexported
Open

func (v ProjectionType) IsKeysOnly() bool {
Severity: Minor
Found in dynamodb/type_enum.go by golint

exported method ProjectionType.IsInclude should have comment or be unexported
Open

func (v ProjectionType) IsInclude() bool {
Severity: Minor
Found in dynamodb/type_enum.go by golint

exported type ReturnItemCollectionMetrics should have comment or be unexported
Open

type ReturnItemCollectionMetrics string
Severity: Minor
Found in dynamodb/type_enum.go by golint

exported method ConditionalOperator.IsOr should have comment or be unexported
Open

func (v ConditionalOperator) IsOr() bool {
Severity: Minor
Found in dynamodb/type_enum.go by golint

exported type StreamViewType should have comment or be unexported
Open

type StreamViewType string
Severity: Minor
Found in dynamodb/type_enum.go by golint

exported type ProjectionType should have comment or be unexported
Open

type ProjectionType string
Severity: Minor
Found in dynamodb/type_enum.go by golint

exported method ReturnValue.IsUpdatedOld should have comment or be unexported
Open

func (v ReturnValue) IsUpdatedOld() bool {
Severity: Minor
Found in dynamodb/type_enum.go by golint

exported type SSEType should have comment or be unexported
Open

type SSEType string
Severity: Minor
Found in dynamodb/type_enum.go by golint

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

    BillingModeProvisioned   BillingMode = BillingMode(SDK.BillingModeProvisioned)
Severity: Minor
Found in dynamodb/type_enum.go by golint

exported method ComparisonOperator.IsLt should have comment or be unexported
Open

func (v ComparisonOperator) IsLt() bool {
Severity: Minor
Found in dynamodb/type_enum.go by golint

exported method ComparisonOperator.IsNotNull should have comment or be unexported
Open

func (v ComparisonOperator) IsNotNull() bool {
Severity: Minor
Found in dynamodb/type_enum.go by golint

exported method KeyType.IsHash should have comment or be unexported
Open

func (v KeyType) IsHash() bool {
Severity: Minor
Found in dynamodb/type_enum.go by golint

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

    ScalarAttributeTypeS ScalarAttributeType = ScalarAttributeType(SDK.ScalarAttributeTypeS)
Severity: Minor
Found in dynamodb/type_enum.go by golint

exported method ComparisonOperator.IsContains should have comment or be unexported
Open

func (v ComparisonOperator) IsContains() bool {
Severity: Minor
Found in dynamodb/type_enum.go by golint

exported method ComparisonOperator.IsNotContains should have comment or be unexported
Open

func (v ComparisonOperator) IsNotContains() bool {
Severity: Minor
Found in dynamodb/type_enum.go by golint

exported type IndexStatus should have comment or be unexported
Open

type IndexStatus string
Severity: Minor
Found in dynamodb/type_enum.go by golint

exported method IndexStatus.IsDeleting should have comment or be unexported
Open

func (v IndexStatus) IsDeleting() bool {
Severity: Minor
Found in dynamodb/type_enum.go by golint

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

    KeyTypeHash  KeyType = KeyType(SDK.KeyTypeHash)
Severity: Minor
Found in dynamodb/type_enum.go by golint

exported method ReturnValue.IsNone should have comment or be unexported
Open

func (v ReturnValue) IsNone() bool {
Severity: Minor
Found in dynamodb/type_enum.go by golint

exported method Select.IsAllProjectedAttributes should have comment or be unexported
Open

func (v Select) IsAllProjectedAttributes() bool {
Severity: Minor
Found in dynamodb/type_enum.go by golint

exported method SSEStatus.IsEnabled should have comment or be unexported
Open

func (v SSEStatus) IsEnabled() bool {
Severity: Minor
Found in dynamodb/type_enum.go by golint

exported method ProjectionType.IsAll should have comment or be unexported
Open

func (v ProjectionType) IsAll() bool {
Severity: Minor
Found in dynamodb/type_enum.go by golint

exported method ReturnItemCollectionMetrics.IsSize should have comment or be unexported
Open

func (v ReturnItemCollectionMetrics) IsSize() bool {
Severity: Minor
Found in dynamodb/type_enum.go by golint

exported type SSEStatus should have comment or be unexported
Open

type SSEStatus string
Severity: Minor
Found in dynamodb/type_enum.go by golint

exported method SSEType.IsAes256 should have comment or be unexported
Open

func (v SSEType) IsAes256() bool {
Severity: Minor
Found in dynamodb/type_enum.go by golint

exported type ReturnValue should have comment or be unexported
Open

type ReturnValue string
Severity: Minor
Found in dynamodb/type_enum.go by golint

exported method ScalarAttributeType.IsN should have comment or be unexported
Open

func (v ScalarAttributeType) IsN() bool {
Severity: Minor
Found in dynamodb/type_enum.go by golint

exported method BillingMode.IsProvisioned should have comment or be unexported
Open

func (v BillingMode) IsProvisioned() bool {
Severity: Minor
Found in dynamodb/type_enum.go by golint

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

    ComparisonOperatorEq          ComparisonOperator = ComparisonOperator(SDK.ComparisonOperatorEq)
Severity: Minor
Found in dynamodb/type_enum.go by golint

exported method ComparisonOperator.IsGe should have comment or be unexported
Open

func (v ComparisonOperator) IsGe() bool {
Severity: Minor
Found in dynamodb/type_enum.go by golint

exported method ComparisonOperator.IsGt should have comment or be unexported
Open

func (v ComparisonOperator) IsGt() bool {
Severity: Minor
Found in dynamodb/type_enum.go by golint

exported type ConditionalOperator should have comment or be unexported
Open

type ConditionalOperator string
Severity: Minor
Found in dynamodb/type_enum.go by golint

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

    IndexStatusCreating IndexStatus = IndexStatus(SDK.IndexStatusCreating)
Severity: Minor
Found in dynamodb/type_enum.go by golint

exported method ReturnConsumedCapacity.IsTotal should have comment or be unexported
Open

func (v ReturnConsumedCapacity) IsTotal() bool {
Severity: Minor
Found in dynamodb/type_enum.go by golint

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

    ReturnValueNone       ReturnValue = ReturnValue(SDK.ReturnValueNone)
Severity: Minor
Found in dynamodb/type_enum.go by golint

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

    SelectAllAttributes          Select = Select(SDK.SelectAllAttributes)
Severity: Minor
Found in dynamodb/type_enum.go by golint

exported method BillingMode.IsPayPerRequest should have comment or be unexported
Open

func (v BillingMode) IsPayPerRequest() bool {
Severity: Minor
Found in dynamodb/type_enum.go by golint

exported method ComparisonOperator.IsLe should have comment or be unexported
Open

func (v ComparisonOperator) IsLe() bool {
Severity: Minor
Found in dynamodb/type_enum.go by golint

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

    SSEStatusEnabling  SSEStatus = SSEStatus(SDK.SSEStatusEnabling)
Severity: Minor
Found in dynamodb/type_enum.go by golint

exported method SSEStatus.IsEnabling should have comment or be unexported
Open

func (v SSEStatus) IsEnabling() bool {
Severity: Minor
Found in dynamodb/type_enum.go by golint

exported method ComparisonOperator.IsNull should have comment or be unexported
Open

func (v ComparisonOperator) IsNull() bool {
Severity: Minor
Found in dynamodb/type_enum.go by golint

exported method IndexStatus.IsCreating should have comment or be unexported
Open

func (v IndexStatus) IsCreating() bool {
Severity: Minor
Found in dynamodb/type_enum.go by golint

exported type KeyType should have comment or be unexported
Open

type KeyType string
Severity: Minor
Found in dynamodb/type_enum.go by golint

exported method KeyType.IsRange should have comment or be unexported
Open

func (v KeyType) IsRange() bool {
Severity: Minor
Found in dynamodb/type_enum.go by golint

exported method ReturnValue.IsAllNew should have comment or be unexported
Open

func (v ReturnValue) IsAllNew() bool {
Severity: Minor
Found in dynamodb/type_enum.go by golint

exported method Select.IsAllAttributes should have comment or be unexported
Open

func (v Select) IsAllAttributes() bool {
Severity: Minor
Found in dynamodb/type_enum.go by golint

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

    SSETypeAes256 SSEType = SSEType(SDK.SSETypeAes256)
Severity: Minor
Found in dynamodb/type_enum.go by golint

exported method IndexStatus.IsUpdating should have comment or be unexported
Open

func (v IndexStatus) IsUpdating() bool {
Severity: Minor
Found in dynamodb/type_enum.go by golint

exported type Select should have comment or be unexported
Open

type Select string
Severity: Minor
Found in dynamodb/type_enum.go by golint

comment on exported const ComparisonOperatorAttrExists should be of the form "ComparisonOperatorAttrExists ..."
Open

    // for expression condition
Severity: Minor
Found in dynamodb/type_enum.go by golint

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

    ReplicaStatusCreating       ReplicaStatus = ReplicaStatus(SDK.ReplicaStatusCreating)
Severity: Minor
Found in dynamodb/type_enum.go by golint

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

    ReturnItemCollectionMetricsSize ReturnItemCollectionMetrics = ReturnItemCollectionMetrics(SDK.ReturnItemCollectionMetricsSize)
Severity: Minor
Found in dynamodb/type_enum.go by golint

exported method ReturnItemCollectionMetrics.IsNone should have comment or be unexported
Open

func (v ReturnItemCollectionMetrics) IsNone() bool {
Severity: Minor
Found in dynamodb/type_enum.go by golint

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

    ConditionalOperatorAnd ConditionalOperator = ConditionalOperator(SDK.ConditionalOperatorAnd)
Severity: Minor
Found in dynamodb/type_enum.go by golint

exported method SSEType.IsKms should have comment or be unexported
Open

func (v SSEType) IsKms() bool {
Severity: Minor
Found in dynamodb/type_enum.go by golint

exported type ComparisonOperator should have comment or be unexported
Open

type ComparisonOperator string
Severity: Minor
Found in dynamodb/type_enum.go by golint

exported type ReturnConsumedCapacity should have comment or be unexported
Open

type ReturnConsumedCapacity string
Severity: Minor
Found in dynamodb/type_enum.go by golint

exported method ReturnConsumedCapacity.IsNone should have comment or be unexported
Open

func (v ReturnConsumedCapacity) IsNone() bool {
Severity: Minor
Found in dynamodb/type_enum.go by golint

exported type ScalarAttributeType should have comment or be unexported
Open

type ScalarAttributeType string
Severity: Minor
Found in dynamodb/type_enum.go by golint

exported method ScalarAttributeType.IsS should have comment or be unexported
Open

func (v ScalarAttributeType) IsS() bool {
Severity: Minor
Found in dynamodb/type_enum.go by golint

exported method SSEStatus.IsDisabling should have comment or be unexported
Open

func (v SSEStatus) IsDisabling() bool {
Severity: Minor
Found in dynamodb/type_enum.go by golint

exported method SSEStatus.IsDisabled should have comment or be unexported
Open

func (v SSEStatus) IsDisabled() bool {
Severity: Minor
Found in dynamodb/type_enum.go by golint

exported type BillingMode should have comment or be unexported
Open

type BillingMode string
Severity: Minor
Found in dynamodb/type_enum.go by golint

exported method ComparisonOperator.IsNe should have comment or be unexported
Open

func (v ComparisonOperator) IsNe() bool {
Severity: Minor
Found in dynamodb/type_enum.go by golint

exported method ReturnConsumedCapacity.IsIndexes should have comment or be unexported
Open

func (v ReturnConsumedCapacity) IsIndexes() bool {
Severity: Minor
Found in dynamodb/type_enum.go by golint

exported method ReturnValue.IsAllOld should have comment or be unexported
Open

func (v ReturnValue) IsAllOld() bool {
Severity: Minor
Found in dynamodb/type_enum.go by golint

exported method ReturnValue.IsUpdatedNew should have comment or be unexported
Open

func (v ReturnValue) IsUpdatedNew() bool {
Severity: Minor
Found in dynamodb/type_enum.go by golint

exported method ScalarAttributeType.IsB should have comment or be unexported
Open

func (v ScalarAttributeType) IsB() bool {
Severity: Minor
Found in dynamodb/type_enum.go by golint

exported method Select.IsSpecificAttributes should have comment or be unexported
Open

func (v Select) IsSpecificAttributes() bool {
Severity: Minor
Found in dynamodb/type_enum.go by golint

exported method TableStatus.IsInaccessibleEncryptionCredentials should have comment or be unexported
Open

func (v TableStatus) IsInaccessibleEncryptionCredentials() bool {
Severity: Minor
Found in dynamodb/type_enum.go by golint

exported method TableStatus.IsDeleting should have comment or be unexported
Open

func (v TableStatus) IsDeleting() bool {
Severity: Minor
Found in dynamodb/type_enum.go by golint

exported method StreamViewType.IsKeysOnly should have comment or be unexported
Open

func (v StreamViewType) IsKeysOnly() bool {
Severity: Minor
Found in dynamodb/type_enum.go by golint

exported method TableStatus.IsActive should have comment or be unexported
Open

func (v TableStatus) IsActive() bool {
Severity: Minor
Found in dynamodb/type_enum.go by golint

exported method StreamViewType.IsNewAndOldImages should have comment or be unexported
Open

func (v StreamViewType) IsNewAndOldImages() bool {
Severity: Minor
Found in dynamodb/type_enum.go by golint

exported method StreamViewType.IsNewImage should have comment or be unexported
Open

func (v StreamViewType) IsNewImage() bool {
Severity: Minor
Found in dynamodb/type_enum.go by golint

exported method StreamViewType.IsOldImage should have comment or be unexported
Open

func (v StreamViewType) IsOldImage() bool {
Severity: Minor
Found in dynamodb/type_enum.go by golint

exported method TableStatus.IsUpdating should have comment or be unexported
Open

func (v TableStatus) IsUpdating() bool {
Severity: Minor
Found in dynamodb/type_enum.go by golint

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

    TableStatusCreating                          TableStatus = TableStatus(SDK.TableStatusCreating)
Severity: Minor
Found in dynamodb/type_enum.go by golint

exported method TableStatus.IsCreating should have comment or be unexported
Open

func (v TableStatus) IsCreating() bool {
Severity: Minor
Found in dynamodb/type_enum.go by golint

exported method TableStatus.IsArchived should have comment or be unexported
Open

func (v TableStatus) IsArchived() bool {
Severity: Minor
Found in dynamodb/type_enum.go by golint

exported method TableStatus.IsArchiving should have comment or be unexported
Open

func (v TableStatus) IsArchiving() bool {
Severity: Minor
Found in dynamodb/type_enum.go by golint

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

    StreamViewTypeNewImage        StreamViewType = StreamViewType(SDK.StreamViewTypeNewImage)
Severity: Minor
Found in dynamodb/type_enum.go by golint

exported type TableStatus should have comment or be unexported
Open

type TableStatus string
Severity: Minor
Found in dynamodb/type_enum.go by golint

There are no issues that match your filters.

Category
Status