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)
- 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 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
- 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 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)
- 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 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
- 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 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)
- 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 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
- 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 method BucketCannedACL.IsPublicReadWrite should have comment or be unexported Open
func (v BucketCannedACL) IsPublicReadWrite() bool {
- Exclude checks
exported method BucketLocationConstraint.IsApSoutheast1 should have comment or be unexported Open
func (v BucketLocationConstraint) IsApSoutheast1() bool {
- Exclude checks
exported method BucketLocationConstraint.IsEuCentral1 should have comment or be unexported Open
func (v BucketLocationConstraint) IsEuCentral1() bool {
- Exclude checks
exported type ObjectLockLegalHoldStatus should have comment or be unexported Open
type ObjectLockLegalHoldStatus string
- Exclude checks
exported method BucketLocationConstraint.IsEuWest1 should have comment or be unexported Open
func (v BucketLocationConstraint) IsEuWest1() bool {
- Exclude checks
exported method BucketLocationConstraint.IsApSoutheast2 should have comment or be unexported Open
func (v BucketLocationConstraint) IsApSoutheast2() bool {
- Exclude checks
exported const ObjectLockRetentionModeGovernance should have comment (or a comment on this block) or be unexported Open
ObjectLockRetentionModeGovernance ObjectLockRetentionMode = ObjectLockRetentionMode(SDK.ObjectLockRetentionModeGovernance)
- Exclude checks
exported method ObjectStorageClass.IsStandardIa should have comment or be unexported Open
func (v ObjectStorageClass) IsStandardIa() bool {
- Exclude checks
exported type ObjectVersionStorageClass should have comment or be unexported Open
type ObjectVersionStorageClass string
- Exclude checks
exported type RequestCharged should have comment or be unexported Open
type RequestCharged string
- Exclude checks
exported method BucketLocationConstraint.IsUsWest1 should have comment or be unexported Open
func (v BucketLocationConstraint) IsUsWest1() bool {
- Exclude checks
exported type ExpirationStatus should have comment or be unexported Open
type ExpirationStatus string
- Exclude checks
exported method ObjectCannedACL.IsBucketOwnerRead should have comment or be unexported Open
func (v ObjectCannedACL) IsBucketOwnerRead() bool {
- Exclude checks
exported method ObjectStorageClass.IsOnezoneIa should have comment or be unexported Open
func (v ObjectStorageClass) IsOnezoneIa() bool {
- Exclude checks
exported method ObjectCannedACL.IsPrivate should have comment or be unexported Open
func (v ObjectCannedACL) IsPrivate() bool {
- Exclude checks
exported method ObjectStorageClass.IsGlacier should have comment or be unexported Open
func (v ObjectStorageClass) IsGlacier() bool {
- Exclude checks
exported method RequestCharged.IsRequester should have comment or be unexported Open
func (v RequestCharged) IsRequester() bool {
- Exclude checks
exported method RequestPayer.IsRequester should have comment or be unexported Open
func (v RequestPayer) IsRequester() bool {
- Exclude checks
exported type BucketCannedACL should have comment or be unexported Open
type BucketCannedACL string
- Exclude checks
exported method ExpirationStatus.IsDisabled should have comment or be unexported Open
func (v ExpirationStatus) IsDisabled() bool {
- Exclude checks
exported method ObjectCannedACL.IsBucketOwnerFullControl should have comment or be unexported Open
func (v ObjectCannedACL) IsBucketOwnerFullControl() bool {
- Exclude checks
exported method ObjectLockLegalHoldStatus.IsOn should have comment or be unexported Open
func (v ObjectLockLegalHoldStatus) IsOn() bool {
- Exclude checks
exported type ObjectLockMode should have comment or be unexported Open
type ObjectLockMode string
- Exclude checks
exported const ObjectLockModeGovernance should have comment (or a comment on this block) or be unexported Open
ObjectLockModeGovernance ObjectLockMode = ObjectLockMode(SDK.ObjectLockModeGovernance)
- Exclude checks
exported method ObjectLockMode.IsGovernance should have comment or be unexported Open
func (v ObjectLockMode) IsGovernance() bool {
- Exclude checks
exported const BucketLocationConstraintEu should have comment (or a comment on this block) or be unexported Open
BucketLocationConstraintEu BucketLocationConstraint = BucketLocationConstraint(SDK.BucketLocationConstraintEu)
- Exclude checks
exported const MetadataDirectiveCopy should have comment (or a comment on this block) or be unexported Open
MetadataDirectiveCopy MetadataDirective = MetadataDirective(SDK.MetadataDirectiveCopy)
- Exclude checks
exported method ObjectCannedACL.IsPublicRead should have comment or be unexported Open
func (v ObjectCannedACL) IsPublicRead() bool {
- Exclude checks
exported type ObjectLockRetentionMode should have comment or be unexported Open
type ObjectLockRetentionMode string
- Exclude checks
exported type ObjectStorageClass should have comment or be unexported Open
type ObjectStorageClass string
- Exclude checks
exported const ReplicationStatusComplete should have comment (or a comment on this block) or be unexported Open
ReplicationStatusComplete ReplicationStatus = ReplicationStatus(SDK.ReplicationStatusComplete)
- Exclude checks
exported const RequestPayerRequester should have comment (or a comment on this block) or be unexported Open
RequestPayerRequester RequestPayer = "requester"
- Exclude checks
exported const BucketCannedACLPrivate should have comment (or a comment on this block) or be unexported Open
BucketCannedACLPrivate BucketCannedACL = BucketCannedACL(SDK.BucketCannedACLPrivate)
- Exclude checks
exported method BucketLocationConstraint.IsUsWest2 should have comment or be unexported Open
func (v BucketLocationConstraint) IsUsWest2() bool {
- Exclude checks
exported type EncodingType should have comment or be unexported Open
type EncodingType string
- Exclude checks
exported type MetadataDirective should have comment or be unexported Open
type MetadataDirective string
- Exclude checks
exported method MetadataDirective.IsCopy should have comment or be unexported Open
func (v MetadataDirective) IsCopy() bool {
- Exclude checks
exported method ObjectLockRetentionMode.IsGovernance should have comment or be unexported Open
func (v ObjectLockRetentionMode) IsGovernance() bool {
- Exclude checks
exported method ObjectStorageClass.IsReducedRedundancy should have comment or be unexported Open
func (v ObjectStorageClass) IsReducedRedundancy() bool {
- Exclude checks
exported method ObjectStorageClass.IsDeepArchive should have comment or be unexported Open
func (v ObjectStorageClass) IsDeepArchive() bool {
- Exclude checks
exported method BucketCannedACL.IsPrivate should have comment or be unexported Open
func (v BucketCannedACL) IsPrivate() bool {
- Exclude checks
exported method BucketLocationConstraint.IsApNortheast1 should have comment or be unexported Open
func (v BucketLocationConstraint) IsApNortheast1() bool {
- Exclude checks
exported method EncodingType.IsURL should have comment or be unexported Open
func (v EncodingType) IsURL() bool {
- Exclude checks
exported method ObjectCannedACL.IsPublicReadWrite should have comment or be unexported Open
func (v ObjectCannedACL) IsPublicReadWrite() bool {
- Exclude checks
exported method ObjectLockRetentionMode.IsCompliance should have comment or be unexported Open
func (v ObjectLockRetentionMode) IsCompliance() bool {
- Exclude checks
exported method BucketLocationConstraint.IsEu should have comment or be unexported Open
func (v BucketLocationConstraint) IsEu() bool {
- Exclude checks
exported method BucketLocationConstraint.IsCnNorth1 should have comment or be unexported Open
func (v BucketLocationConstraint) IsCnNorth1() bool {
- Exclude checks
exported const PermissionFullControl should have comment (or a comment on this block) or be unexported Open
PermissionFullControl Permission = Permission(SDK.PermissionFullControl)
- Exclude checks
exported const EncodingTypeURL should have comment (or a comment on this block) or be unexported Open
EncodingTypeURL EncodingType = EncodingType(SDK.EncodingTypeUrl)
- Exclude checks
exported method ObjectCannedACL.IsAuthenticatedRead should have comment or be unexported Open
func (v ObjectCannedACL) IsAuthenticatedRead() bool {
- Exclude checks
exported const ObjectVersionStorageClassStandard should have comment (or a comment on this block) or be unexported Open
ObjectVersionStorageClassStandard ObjectVersionStorageClass = ObjectVersionStorageClass(SDK.ObjectVersionStorageClassStandard)
- Exclude checks
exported type ReplicationStatus should have comment or be unexported Open
type ReplicationStatus string
- Exclude checks
exported method ReplicationStatus.IsPending should have comment or be unexported Open
func (v ReplicationStatus) IsPending() bool {
- Exclude checks
exported method ReplicationStatus.IsFailed should have comment or be unexported Open
func (v ReplicationStatus) IsFailed() bool {
- Exclude checks
exported method BucketCannedACL.IsAuthenticatedRead should have comment or be unexported Open
func (v BucketCannedACL) IsAuthenticatedRead() bool {
- Exclude checks
exported method ObjectStorageClass.IsStandard should have comment or be unexported Open
func (v ObjectStorageClass) IsStandard() bool {
- Exclude checks
exported method ReplicationStatus.IsReplica should have comment or be unexported Open
func (v ReplicationStatus) IsReplica() bool {
- Exclude checks
exported const ExpirationStatusEnabled should have comment (or a comment on this block) or be unexported Open
ExpirationStatusEnabled ExpirationStatus = ExpirationStatus(SDK.ExpirationStatusEnabled)
- Exclude checks
exported method MetadataDirective.IsReplace should have comment or be unexported Open
func (v MetadataDirective) IsReplace() bool {
- Exclude checks
exported const ObjectLockLegalHoldStatusOn should have comment (or a comment on this block) or be unexported Open
ObjectLockLegalHoldStatusOn ObjectLockLegalHoldStatus = ObjectLockLegalHoldStatus(SDK.ObjectLockLegalHoldStatusOn)
- Exclude checks
exported method ObjectLockLegalHoldStatus.IsOff should have comment or be unexported Open
func (v ObjectLockLegalHoldStatus) IsOff() bool {
- Exclude checks
exported const ObjectStorageClassStandard should have comment (or a comment on this block) or be unexported Open
ObjectStorageClassStandard ObjectStorageClass = ObjectStorageClass(SDK.ObjectStorageClassStandard)
- Exclude checks
exported method ObjectStorageClass.IsIntelligentTiering should have comment or be unexported Open
func (v ObjectStorageClass) IsIntelligentTiering() bool {
- Exclude checks
exported const RequestChargedRequester should have comment (or a comment on this block) or be unexported Open
RequestChargedRequester RequestCharged = RequestCharged(SDK.RequestChargedRequester)
- Exclude checks
exported method BucketCannedACL.IsPublicRead should have comment or be unexported Open
func (v BucketCannedACL) IsPublicRead() bool {
- Exclude checks
exported type BucketLocationConstraint should have comment or be unexported Open
type BucketLocationConstraint string
- Exclude checks
exported method BucketLocationConstraint.IsApSouth1 should have comment or be unexported Open
func (v BucketLocationConstraint) IsApSouth1() bool {
- Exclude checks
exported method BucketLocationConstraint.IsSaEast1 should have comment or be unexported Open
func (v BucketLocationConstraint) IsSaEast1() bool {
- Exclude checks
exported const ObjectCannedACLPrivate should have comment (or a comment on this block) or be unexported Open
ObjectCannedACLPrivate ObjectCannedACL = ObjectCannedACL(SDK.ObjectCannedACLPrivate)
- Exclude checks
exported method ObjectLockMode.IsCompliance should have comment or be unexported Open
func (v ObjectLockMode) IsCompliance() bool {
- Exclude checks
exported method ExpirationStatus.IsEnabled should have comment or be unexported Open
func (v ExpirationStatus) IsEnabled() bool {
- Exclude checks
exported method ObjectCannedACL.IsAwsExecRead should have comment or be unexported Open
func (v ObjectCannedACL) IsAwsExecRead() bool {
- Exclude checks
exported method ObjectVersionStorageClass.IsStandard should have comment or be unexported Open
func (v ObjectVersionStorageClass) IsStandard() bool {
- Exclude checks
exported type Permission should have comment or be unexported Open
type Permission string
- Exclude checks
exported type ObjectCannedACL should have comment or be unexported Open
type ObjectCannedACL string
- Exclude checks
exported method ReplicationStatus.IsComplete should have comment or be unexported Open
func (v ReplicationStatus) IsComplete() bool {
- Exclude checks
exported type RequestPayer should have comment or be unexported Open
type RequestPayer string
- Exclude checks
exported method TransitionStorageClass.IsIntelligentTiering should have comment or be unexported Open
func (v TransitionStorageClass) IsIntelligentTiering() bool {
- Exclude checks
exported const TypeCanonicalUser should have comment (or a comment on this block) or be unexported Open
TypeCanonicalUser Type = Type(SDK.TypeCanonicalUser)
- Exclude checks
exported const StorageClassStandard should have comment (or a comment on this block) or be unexported Open
StorageClassStandard StorageClass = StorageClass(SDK.StorageClassStandard)
- Exclude checks
exported method TaggingDirective.IsReplace should have comment or be unexported Open
func (v TaggingDirective) IsReplace() bool {
- Exclude checks
exported type TransitionStorageClass should have comment or be unexported Open
type TransitionStorageClass string
- Exclude checks
exported type Type should have comment or be unexported Open
type Type string
- Exclude checks
exported method StorageClass.IsOnezoneIa should have comment or be unexported Open
func (v StorageClass) IsOnezoneIa() bool {
- Exclude checks
exported const TaggingDirectiveCopy should have comment (or a comment on this block) or be unexported Open
TaggingDirectiveCopy TaggingDirective = TaggingDirective(SDK.TaggingDirectiveCopy)
- Exclude checks
exported method StorageClass.IsIntelligentTiering should have comment or be unexported Open
func (v StorageClass) IsIntelligentTiering() bool {
- Exclude checks
exported method StorageClass.IsGlacier should have comment or be unexported Open
func (v StorageClass) IsGlacier() bool {
- Exclude checks
exported method TransitionStorageClass.IsOnezoneIa should have comment or be unexported Open
func (v TransitionStorageClass) IsOnezoneIa() bool {
- Exclude checks
exported method TransitionStorageClass.IsDeepArchive should have comment or be unexported Open
func (v TransitionStorageClass) IsDeepArchive() bool {
- Exclude checks
exported method StorageClass.IsReducedRedundancy should have comment or be unexported Open
func (v StorageClass) IsReducedRedundancy() bool {
- Exclude checks
exported const ServerSideEncryptionAes256 should have comment (or a comment on this block) or be unexported Open
ServerSideEncryptionAes256 ServerSideEncryption = "AES256"
- Exclude checks
exported method Type.IsGroup should have comment or be unexported Open
func (v Type) IsGroup() bool {
- Exclude checks
exported method StorageClass.IsStandardIa should have comment or be unexported Open
func (v StorageClass) IsStandardIa() bool {
- Exclude checks
exported method TaggingDirective.IsCopy should have comment or be unexported Open
func (v TaggingDirective) IsCopy() bool {
- Exclude checks
exported method Type.IsAmazonCustomerByEmail should have comment or be unexported Open
func (v Type) IsAmazonCustomerByEmail() bool {
- Exclude checks
exported method TransitionStorageClass.IsStandardIa should have comment or be unexported Open
func (v TransitionStorageClass) IsStandardIa() bool {
- Exclude checks
exported method Type.IsCanonicalUser should have comment or be unexported Open
func (v Type) IsCanonicalUser() bool {
- Exclude checks
exported const TransitionStorageClassGlacier should have comment (or a comment on this block) or be unexported Open
TransitionStorageClassGlacier TransitionStorageClass = TransitionStorageClass(SDK.TransitionStorageClassGlacier)
- Exclude checks
exported method TransitionStorageClass.IsGlacier should have comment or be unexported Open
func (v TransitionStorageClass) IsGlacier() bool {
- Exclude checks
exported type ServerSideEncryption should have comment or be unexported Open
type ServerSideEncryption string
- Exclude checks
exported method ServerSideEncryption.IsAwsKms should have comment or be unexported Open
func (v ServerSideEncryption) IsAwsKms() bool {
- Exclude checks
exported type StorageClass should have comment or be unexported Open
type StorageClass string
- Exclude checks
exported method StorageClass.IsStandard should have comment or be unexported Open
func (v StorageClass) IsStandard() bool {
- Exclude checks
exported method StorageClass.IsDeepArchive should have comment or be unexported Open
func (v StorageClass) IsDeepArchive() bool {
- Exclude checks
exported type TaggingDirective should have comment or be unexported Open
type TaggingDirective string
- Exclude checks
exported method ServerSideEncryption.IsAes256 should have comment or be unexported Open
func (v ServerSideEncryption) IsAes256() bool {
- Exclude checks