evalphobia/aws-sdk-go-v2-wrapper

View on GitHub
pinpoint/type_enum.go

Summary

Maintainability
B
4 hrs
Test Coverage

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

const (
    ChannelTypePush            ChannelType = ChannelType(SDK.ChannelTypePush)
    ChannelTypeGCM             ChannelType = ChannelType(SDK.ChannelTypeGcm)
    ChannelTypeAPNs            ChannelType = ChannelType(SDK.ChannelTypeApns)
    ChannelTypeAPNsSandbox     ChannelType = ChannelType(SDK.ChannelTypeApnsSandbox)
Severity: Major
Found in pinpoint/type_enum.go and 1 other location - About 1 hr to fix
pinpoint/type_enum.go on lines 68..81

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

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

const (
    EndpointTypesElementPush            ChannelType = ChannelType(SDK.EndpointTypesElementPush)
    EndpointTypesElementGCM             ChannelType = ChannelType(SDK.EndpointTypesElementGcm)
    EndpointTypesElementAPNs            ChannelType = ChannelType(SDK.EndpointTypesElementApns)
    EndpointTypesElementAPNsSandbox     ChannelType = ChannelType(SDK.EndpointTypesElementApnsSandbox)
Severity: Major
Found in pinpoint/type_enum.go and 1 other location - About 1 hr to fix
pinpoint/type_enum.go on lines 35..48

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

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

const (
    JobStatusCreated                    JobStatus = JobStatus(SDK.JobStatusCreated)
    JobStatusPreparingForInitialization JobStatus = JobStatus(SDK.JobStatusPreparingForInitialization)
    JobStatusInitializing               JobStatus = JobStatus(SDK.JobStatusInitializing)
    JobStatusProcessing                 JobStatus = JobStatus(SDK.JobStatusProcessing)
Severity: Major
Found in pinpoint/type_enum.go and 1 other location - About 1 hr to fix
kms/type_enum.go on lines 69..79

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 const FilterTypeSystem should have comment (or a comment on this block) or be unexported
Open

    FilterTypeSystem   FilterType = FilterType(SDK.FilterTypeSystem)
Severity: Minor
Found in pinpoint/type_enum.go by golint

exported type Frequency should have comment or be unexported
Open

type Frequency string
Severity: Minor
Found in pinpoint/type_enum.go by golint

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

    SegmentTypeDimensional SegmentType = SegmentType(SDK.SegmentTypeDimensional)
Severity: Minor
Found in pinpoint/type_enum.go by golint

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

    IncludeAll  Include = Include(SDK.IncludeAll)
Severity: Minor
Found in pinpoint/type_enum.go by golint

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

    MessageTypeTransactional MessageType = MessageType(SDK.MessageTypeTransactional)
Severity: Minor
Found in pinpoint/type_enum.go by golint

exported type Type should have comment or be unexported
Open

type Type string
Severity: Minor
Found in pinpoint/type_enum.go by golint

exported type CampaignStatus should have comment or be unexported
Open

type CampaignStatus string
Severity: Minor
Found in pinpoint/type_enum.go by golint

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

    DimensionTypeInclusive DimensionType = DimensionType(SDK.DimensionTypeInclusive)
Severity: Minor
Found in pinpoint/type_enum.go by golint

exported type Include should have comment or be unexported
Open

type Include string
Severity: Minor
Found in pinpoint/type_enum.go by golint

exported type MessageType should have comment or be unexported
Open

type MessageType string
Severity: Minor
Found in pinpoint/type_enum.go by golint

exported type Mode should have comment or be unexported
Open

type Mode string
Severity: Minor
Found in pinpoint/type_enum.go by golint

exported type DimensionType should have comment or be unexported
Open

type DimensionType string
Severity: Minor
Found in pinpoint/type_enum.go by golint

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

    ChannelTypePush            ChannelType = ChannelType(SDK.ChannelTypePush)
Severity: Minor
Found in pinpoint/type_enum.go by golint

exported type EndpointTypesElement should have comment or be unexported
Open

type EndpointTypesElement string
Severity: Minor
Found in pinpoint/type_enum.go by golint

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

    FormatCSV  Format = Format(SDK.FormatCsv)
Severity: Minor
Found in pinpoint/type_enum.go by golint

exported type RecencyType should have comment or be unexported
Open

type RecencyType string
Severity: Minor
Found in pinpoint/type_enum.go by golint

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

    SourceTypeAll  SourceType = SourceType(SDK.SourceTypeAll)
Severity: Minor
Found in pinpoint/type_enum.go by golint

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

    TemplateTypeEmail TemplateType = TemplateType(SDK.TemplateTypeEmail)
Severity: Minor
Found in pinpoint/type_enum.go by golint

exported type Action should have comment or be unexported
Open

type Action string
Severity: Minor
Found in pinpoint/type_enum.go by golint

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

    EndpointTypesElementPush            ChannelType = ChannelType(SDK.EndpointTypesElementPush)
Severity: Minor
Found in pinpoint/type_enum.go by golint

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

    ModeDelivery Mode = Mode(SDK.ModeDelivery)
Severity: Minor
Found in pinpoint/type_enum.go by golint

exported type TemplateType should have comment or be unexported
Open

type TemplateType string
Severity: Minor
Found in pinpoint/type_enum.go by golint

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

    ActionOpenApp  Action = Action(SDK.ActionOpenApp)
Severity: Minor
Found in pinpoint/type_enum.go by golint

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

    CampaignStatusScheduled      CampaignStatus = CampaignStatus(SDK.CampaignStatusScheduled)
Severity: Minor
Found in pinpoint/type_enum.go by golint

exported type FilterType should have comment or be unexported
Open

type FilterType string
Severity: Minor
Found in pinpoint/type_enum.go by golint

exported type Format should have comment or be unexported
Open

type Format string
Severity: Minor
Found in pinpoint/type_enum.go by golint

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

    AttributeTypeInclusive AttributeType = AttributeType(SDK.AttributeTypeInclusive)
Severity: Minor
Found in pinpoint/type_enum.go by golint

exported type AttributeType should have comment or be unexported
Open

type AttributeType string
Severity: Minor
Found in pinpoint/type_enum.go by golint

exported type SegmentType should have comment or be unexported
Open

type SegmentType string
Severity: Minor
Found in pinpoint/type_enum.go by golint

exported type SourceType should have comment or be unexported
Open

type SourceType string
Severity: Minor
Found in pinpoint/type_enum.go by golint

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

    JobStatusCreated                    JobStatus = JobStatus(SDK.JobStatusCreated)
Severity: Minor
Found in pinpoint/type_enum.go by golint

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

    RecencyTypeActive   RecencyType = RecencyType(SDK.RecencyTypeActive)
Severity: Minor
Found in pinpoint/type_enum.go by golint

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

    TypeAll  Type = Type(SDK.TypeAll)
Severity: Minor
Found in pinpoint/type_enum.go by golint

exported type Duration should have comment or be unexported
Open

type Duration string
Severity: Minor
Found in pinpoint/type_enum.go by golint

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

    DurationHr24  Duration = Duration(SDK.DurationHr24)
Severity: Minor
Found in pinpoint/type_enum.go by golint

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

    FrequencyOnce    Frequency = Frequency(SDK.FrequencyOnce)
Severity: Minor
Found in pinpoint/type_enum.go by golint

exported type ChannelType should have comment or be unexported
Open

type ChannelType string
Severity: Minor
Found in pinpoint/type_enum.go by golint

exported type JobStatus should have comment or be unexported
Open

type JobStatus string
Severity: Minor
Found in pinpoint/type_enum.go by golint

There are no issues that match your filters.

Category
Status