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)
- Read upRead up
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
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)
- Read upRead up
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
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)
- Read upRead up
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
exported const FilterTypeSystem should have comment (or a comment on this block) or be unexported Open
FilterTypeSystem FilterType = FilterType(SDK.FilterTypeSystem)
- Exclude checks
exported type Frequency should have comment or be unexported Open
type Frequency string
- Exclude checks
exported const SegmentTypeDimensional should have comment (or a comment on this block) or be unexported Open
SegmentTypeDimensional SegmentType = SegmentType(SDK.SegmentTypeDimensional)
- Exclude checks
exported const IncludeAll should have comment (or a comment on this block) or be unexported Open
IncludeAll Include = Include(SDK.IncludeAll)
- Exclude checks
exported const MessageTypeTransactional should have comment (or a comment on this block) or be unexported Open
MessageTypeTransactional MessageType = MessageType(SDK.MessageTypeTransactional)
- Exclude checks
exported type Type should have comment or be unexported Open
type Type string
- Exclude checks
exported type CampaignStatus should have comment or be unexported Open
type CampaignStatus string
- Exclude checks
exported const DimensionTypeInclusive should have comment (or a comment on this block) or be unexported Open
DimensionTypeInclusive DimensionType = DimensionType(SDK.DimensionTypeInclusive)
- Exclude checks
exported type Include should have comment or be unexported Open
type Include string
- Exclude checks
exported type MessageType should have comment or be unexported Open
type MessageType string
- Exclude checks
exported type Mode should have comment or be unexported Open
type Mode string
- Exclude checks
exported type DimensionType should have comment or be unexported Open
type DimensionType string
- Exclude checks
exported const ChannelTypePush should have comment (or a comment on this block) or be unexported Open
ChannelTypePush ChannelType = ChannelType(SDK.ChannelTypePush)
- Exclude checks
exported type EndpointTypesElement should have comment or be unexported Open
type EndpointTypesElement string
- Exclude checks
exported const FormatCSV should have comment (or a comment on this block) or be unexported Open
FormatCSV Format = Format(SDK.FormatCsv)
- Exclude checks
exported type RecencyType should have comment or be unexported Open
type RecencyType string
- Exclude checks
exported const SourceTypeAll should have comment (or a comment on this block) or be unexported Open
SourceTypeAll SourceType = SourceType(SDK.SourceTypeAll)
- Exclude checks
exported const TemplateTypeEmail should have comment (or a comment on this block) or be unexported Open
TemplateTypeEmail TemplateType = TemplateType(SDK.TemplateTypeEmail)
- Exclude checks
exported type Action should have comment or be unexported Open
type Action string
- Exclude checks
exported const EndpointTypesElementPush should have comment (or a comment on this block) or be unexported Open
EndpointTypesElementPush ChannelType = ChannelType(SDK.EndpointTypesElementPush)
- Exclude checks
exported const ModeDelivery should have comment (or a comment on this block) or be unexported Open
ModeDelivery Mode = Mode(SDK.ModeDelivery)
- Exclude checks
exported type TemplateType should have comment or be unexported Open
type TemplateType string
- Exclude checks
exported const ActionOpenApp should have comment (or a comment on this block) or be unexported Open
ActionOpenApp Action = Action(SDK.ActionOpenApp)
- Exclude checks
exported const CampaignStatusScheduled should have comment (or a comment on this block) or be unexported Open
CampaignStatusScheduled CampaignStatus = CampaignStatus(SDK.CampaignStatusScheduled)
- Exclude checks
exported type FilterType should have comment or be unexported Open
type FilterType string
- Exclude checks
exported type Format should have comment or be unexported Open
type Format string
- Exclude checks
exported const AttributeTypeInclusive should have comment (or a comment on this block) or be unexported Open
AttributeTypeInclusive AttributeType = AttributeType(SDK.AttributeTypeInclusive)
- Exclude checks
exported type AttributeType should have comment or be unexported Open
type AttributeType string
- Exclude checks
exported type SegmentType should have comment or be unexported Open
type SegmentType string
- Exclude checks
exported type SourceType should have comment or be unexported Open
type SourceType string
- Exclude checks
exported const JobStatusCreated should have comment (or a comment on this block) or be unexported Open
JobStatusCreated JobStatus = JobStatus(SDK.JobStatusCreated)
- Exclude checks
exported const RecencyTypeActive should have comment (or a comment on this block) or be unexported Open
RecencyTypeActive RecencyType = RecencyType(SDK.RecencyTypeActive)
- Exclude checks
exported const TypeAll should have comment (or a comment on this block) or be unexported Open
TypeAll Type = Type(SDK.TypeAll)
- Exclude checks
exported type Duration should have comment or be unexported Open
type Duration string
- Exclude checks
exported const DurationHr24 should have comment (or a comment on this block) or be unexported Open
DurationHr24 Duration = Duration(SDK.DurationHr24)
- Exclude checks
exported const FrequencyOnce should have comment (or a comment on this block) or be unexported Open
FrequencyOnce Frequency = Frequency(SDK.FrequencyOnce)
- Exclude checks
exported type ChannelType should have comment or be unexported Open
type ChannelType string
- Exclude checks
exported type JobStatus should have comment or be unexported Open
type JobStatus string
- Exclude checks