Preparing report...

Report for github.com/johannesboyne/gofakes3

(v0.0.0-20220314170512-33c13122505e)

A+    Excellent!    Found 33 issues across 62 files

Tweet

gofmt98%

Gofmt formats Go programs. We run gofmt -s on your code, where -s is for the "simplify" command


go_vet100%

go vet examines Go source code and reports suspicious constructs, such as Printf calls whose arguments do not align with the format string.

No problems detected. Good job!


gocyclo90%

Gocyclo calculates cyclomatic complexities of functions in Go source code. The cyclomatic complexity of a function is calculated according to the following rules: 1 is the base complexity of a function +1 for each 'if', 'for', 'case', '&&' or '||' Go Report Card warns on functions with cyclomatic complexity > 15.

    • init_test.go
    • Line 517: warning: cyclomatic complexity 19 of function (*testServer).assertListMultipartUploads() is high (> 15) (gocyclo)
    • uploader.go
    • Line 235: warning: cyclomatic complexity 17 of function (*uploader).List() is high (> 15) (gocyclo)
    • gofakes3.go
    • Line 543: warning: cyclomatic complexity 16 of function (*GoFakeS3).createObject() is high (> 15) (gocyclo)

golint54%

Golint is a linter for Go source code.

    • internal/s3assumer/context.go
    • Line 14: warning: exported type Context should have comment or be unexported (golint)
    • Line 20: warning: exported method Context.Config should have comment or be unexported (golint)
    • Line 21: warning: exported method Context.Rand should have comment or be unexported (golint)
    • Line 22: warning: exported method Context.RandString should have comment or be unexported (golint)
    • Line 24: warning: exported method Context.RandBytes should have comment or be unexported (golint)
    • Line 30: warning: exported method Context.S3Client should have comment or be unexported (golint)
    • Line 52: warning: exported method Context.EnsureVersioningEnabled should have comment or be unexported (golint)
    • Line 73: warning: exported method Context.EnsureVersioningNeverEnabled should have comment or be unexported (golint)
    • Line 104: warning: exported type Logger should have comment or be unexported (golint)
    • Line 106: warning: exported method Logger.Log should have comment or be unexported (golint)
    • backend/s3afero/modres.go
    • Line 44: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 59: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • messages.go
    • Line 11: warning: exported type Storage should have comment or be unexported (golint)
    • Line 18: warning: exported type UserInfo should have comment or be unexported (golint)
    • Line 23: warning: exported type Buckets should have comment or be unexported (golint)
    • Line 50: warning: exported type CompletedPart should have comment or be unexported (golint)
    • Line 55: warning: exported type CompleteMultipartUploadRequest should have comment or be unexported (golint)
    • Line 72: warning: exported type CompleteMultipartUploadResult should have comment or be unexported (golint)
    • Line 79: warning: exported type Content should have comment or be unexported (golint)
    • Line 88: warning: exported type ContentTime should have comment or be unexported (golint)
    • Line 92: warning: exported function NewContentTime should have comment or be unexported (golint)
    • Line 96: warning: exported method ContentTime.MarshalXML should have comment or be unexported (golint)
    • Line 105: warning: exported type DeleteRequest should have comment or be unexported (golint)
    • Line 126: warning: exported method MultiDeleteResult.AsError should have comment or be unexported (golint)
    • Line 137: warning: exported type ErrorResult should have comment or be unexported (golint)
    • Line 146: warning: exported function ErrorResultFromError should have comment or be unexported (golint)
    • Line 172: warning: exported type InitiateMultipartUpload should have comment or be unexported (golint)
    • Line 178: warning: exported type ListBucketResultBase should have comment or be unexported (golint)
    • Line 208: warning: exported type GetBucketLocation should have comment or be unexported (golint)
    • Line 214: warning: exported type ListBucketResult should have comment or be unexported (golint)
    • Line 233: warning: exported type ListBucketResultV2 should have comment or be unexported (golint)
    • Line 253: warning: exported type DeleteMarker should have comment or be unexported (golint)
    • Line 264: warning: exported method DeleteMarker.GetVersionID should have comment or be unexported (golint)
    • Line 267: warning: exported type Version should have comment or be unexported (golint)
    • Line 284: warning: exported method Version.GetVersionID should have comment or be unexported (golint)
    • Line 287: warning: exported type VersionItem should have comment or be unexported (golint)
    • Line 292: warning: exported type ListBucketVersionsResult should have comment or be unexported (golint)
    • Line 336: warning: exported function NewListBucketVersionsResult should have comment or be unexported (golint)
    • Line 358: warning: exported method ListBucketVersionsResult.AddPrefix should have comment or be unexported (golint)
    • Line 368: warning: exported type ListMultipartUploadsResult should have comment or be unexported (golint)
    • Line 400: warning: exported type ListMultipartUploadItem should have comment or be unexported (golint)
    • Line 409: warning: exported type ListMultipartUploadPartsResult should have comment or be unexported (golint)
    • Line 426: warning: exported type ListMultipartUploadPartItem should have comment or be unexported (golint)
    • Line 443: warning: exported method MFADeleteStatus.Enabled should have comment or be unexported (golint)
    • Line 445: warning: exported method MFADeleteStatus.UnmarshalXML should have comment or be unexported (golint)
    • Line 463: warning: exported const MFADeleteNone should have comment (or a comment on this block) or be unexported (golint)
    • Line 468: warning: exported type ObjectID should have comment or be unexported (golint)
    • Line 475: warning: exported type StorageClass should have comment or be unexported (golint)
    • Line 477: warning: exported method StorageClass.MarshalXML should have comment or be unexported (golint)
    • Line 485: warning: exported const StorageStandard should have comment (or a comment on this block) or be unexported (golint)
    • Line 492: warning: exported type VersionID should have comment or be unexported (golint)
    • Line 494: warning: exported type VersioningConfiguration should have comment or be unexported (golint)
    • Line 505: warning: exported method VersioningConfiguration.Enabled should have comment or be unexported (golint)
    • Line 509: warning: exported method VersioningConfiguration.SetEnabled should have comment or be unexported (golint)
    • Line 517: warning: exported type VersioningStatus should have comment or be unexported (golint)
    • Line 519: warning: exported method VersioningStatus.UnmarshalXML should have comment or be unexported (golint)
    • Line 537: warning: exported const VersioningNone should have comment (or a comment on this block) or be unexported (golint)
    • routing.go
    • Line 100: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 112: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • internal/goskipiter/iter.go
    • Line 16: warning: exported function New should have comment or be unexported (golint)
    • Line 26: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • backend/s3bolt/backend.go
    • Line 21: warning: exported type Backend should have comment or be unexported (golint)
    • Line 29: warning: exported type Option should have comment or be unexported (golint)
    • Line 31: warning: exported function WithTimeSource should have comment or be unexported (golint)
    • Line 35: warning: exported function NewFile should have comment or be unexported (golint)
    • Line 46: warning: exported function New should have comment or be unexported (golint)
    • Line 87: warning: exported method Backend.ListBuckets should have comment or be unexported (golint)
    • Line 133: warning: exported method Backend.ListBucket should have comment or be unexported (golint)
    • Line 182: warning: exported method Backend.CreateBucket should have comment or be unexported (golint)
    • Line 207: warning: exported method Backend.DeleteBucket should have comment or be unexported (golint)
    • Line 246: warning: exported method Backend.BucketExists should have comment or be unexported (golint)
    • Line 255: warning: exported method Backend.HeadObject should have comment or be unexported (golint)
    • Line 264: warning: exported method Backend.GetObject should have comment or be unexported (golint)
    • Line 294: warning: exported method Backend.PutObject should have comment or be unexported (golint)
    • Line 332: warning: exported method Backend.DeleteObject should have comment or be unexported (golint)
    • Line 345: warning: exported method Backend.DeleteMulti should have comment or be unexported (golint)
    • constants.go
    • Line 6: warning: comment on exported const KeySizeLimit should be of the form "KeySizeLimit ..." (golint)
    • Line 11: warning: comment on exported const DefaultMetadataSizeLimit should be of the form "DefaultMetadataSizeLimit ..." (golint)
    • Line 22: warning: comment on exported const DefaultUploadPartSize should be of the form "DefaultUploadPartSize ..." (golint)
    • Line 29: warning: exported const DefaultSkewLimit should have comment (or a comment on this block) or be unexported (golint)
    • Line 42: warning: comment on exported const MaxUploadPartNumber should be of the form "MaxUploadPartNumber ..." (golint)
    • backend/s3afero/meta.go
    • Line 15: warning: exported type Metadata should have comment or be unexported (golint)
    • Line 120: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 128: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • backend/s3afero/multi.go
    • Line 46: warning: exported function MultiBucket should have comment or be unexported (golint)
    • Line 70: warning: exported method MultiBucketBackend.ListBuckets should have comment or be unexported (golint)
    • Line 100: warning: exported method MultiBucketBackend.ListBucket should have comment or be unexported (golint)
    • Line 117: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 219: warning: exported method MultiBucketBackend.CreateBucket should have comment or be unexported (golint)
    • Line 235: warning: exported method MultiBucketBackend.DeleteBucket should have comment or be unexported (golint)
    • Line 270: warning: exported method MultiBucketBackend.BucketExists should have comment or be unexported (golint)
    • Line 277: warning: exported method MultiBucketBackend.HeadObject should have comment or be unexported (golint)
    • Line 314: warning: exported method MultiBucketBackend.GetObject should have comment or be unexported (golint)
    • Line 377: warning: exported method MultiBucketBackend.PutObject should have comment or be unexported (golint)
    • Line 450: warning: exported method MultiBucketBackend.DeleteObject should have comment or be unexported (golint)
    • Line 481: warning: exported method MultiBucketBackend.DeleteMulti should have comment or be unexported (golint)
    • prefix.go
    • Line 9: warning: exported type Prefix should have comment or be unexported (golint)
    • Line 27: warning: exported function NewPrefix should have comment or be unexported (golint)
    • Line 37: warning: exported function NewFolderPrefix should have comment or be unexported (golint)
    • Line 60: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 65: warning: comment on exported method Prefix.Match should be of the form "Match ..." (golint)
    • Line 152: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 157: warning: exported type PrefixMatch should have comment or be unexported (golint)
    • Line 169: warning: exported method PrefixMatch.AsCommonPrefix should have comment or be unexported (golint)
    • time.go
    • Line 5: warning: exported type TimeSource should have comment or be unexported (golint)
    • Line 10: warning: exported type TimeSourceAdvancer should have comment or be unexported (golint)
    • Line 21: warning: exported function DefaultTimeSource should have comment or be unexported (golint)
    • backend/s3mem/backend.go
    • Line 18: warning: exported type Backend should have comment or be unexported (golint)
    • Line 31: warning: exported type Option should have comment or be unexported (golint)
    • Line 33: warning: exported function WithTimeSource should have comment or be unexported (golint)
    • Line 37: warning: exported function WithVersionSeed should have comment or be unexported (golint)
    • Line 41: warning: exported function New should have comment or be unexported (golint)
    • Line 61: warning: exported method Backend.ListBuckets should have comment or be unexported (golint)
    • Line 76: warning: exported method Backend.ListBucket should have comment or be unexported (golint)
    • Line 135: warning: exported method Backend.CreateBucket should have comment or be unexported (golint)
    • Line 147: warning: exported method Backend.DeleteBucket should have comment or be unexported (golint)
    • Line 164: warning: exported method Backend.BucketExists should have comment or be unexported (golint)
    • Line 170: warning: exported method Backend.HeadObject should have comment or be unexported (golint)
    • Line 187: warning: exported method Backend.GetObject should have comment or be unexported (golint)
    • Line 219: warning: exported method Backend.PutObject should have comment or be unexported (golint)
    • Line 256: warning: exported method Backend.DeleteObject should have comment or be unexported (golint)
    • Line 268: warning: exported method Backend.DeleteMulti should have comment or be unexported (golint)
    • Line 301: warning: exported method Backend.VersioningConfiguration should have comment or be unexported (golint)
    • Line 315: warning: exported method Backend.SetVersioningConfiguration should have comment or be unexported (golint)
    • Line 333: warning: exported method Backend.GetObjectVersion should have comment or be unexported (golint)
    • Line 354: warning: exported method Backend.HeadObjectVersion should have comment or be unexported (golint)
    • Line 371: warning: exported method Backend.DeleteObjectVersion should have comment or be unexported (golint)
    • Line 383: warning: exported method Backend.ListBucketVersions should have comment or be unexported (golint)
    • backend/s3afero/option.go
    • Line 7: warning: exported type MultiOption should have comment or be unexported (golint)
    • Line 9: warning: exported function MultiWithMetaFs should have comment or be unexported (golint)
    • Line 19: warning: exported type SingleOption should have comment or be unexported (golint)
    • log.go
    • Line 5: warning: exported type LogLevel should have comment or be unexported (golint)
    • Line 8: warning: exported const LogErr should have comment (or a comment on this block) or be unexported (golint)
    • option.go
    • Line 5: warning: exported type Option should have comment or be unexported (golint)
    • internal/s3assumer/config.go
    • Line 3: warning: exported type Config should have comment or be unexported (golint)
    • Line 11: warning: exported method Config.BucketStandard should have comment or be unexported (golint)
    • Line 15: warning: exported method Config.BucketUnversioned should have comment or be unexported (golint)
    • internal/s3assumer/s300002_delete_nonexistent_version.go
    • Line 12: warning: comment on exported type S300002DeleteNonexistentVersion should be of the form "S300002DeleteNonexistentVersion ..." (with optional leading article) (golint)
    • Line 23: warning: exported method S300002DeleteNonexistentVersion.Run should have comment or be unexported (golint)
    • range.go
    • Line 10: warning: exported type ObjectRange should have comment or be unexported (golint)
    • Line 23: warning: exported type ObjectRangeRequest should have comment or be unexported (golint)
    • Line 28: warning: exported const RangeNoEnd should have comment or be unexported (golint)
    • Line 30: warning: exported method ObjectRangeRequest.Range should have comment or be unexported (golint)
    • gofakes3.go
    • Line 74: warning: comment on exported method GoFakeS3.Server should be of the form "Server ..." (golint)
    • Line 233: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 946: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • internal/s3io/io.go
    • Line 5: warning: exported type ReaderWithDummyCloser should have comment or be unexported (golint)
    • Line 7: warning: exported method ReaderWithDummyCloser.Close should have comment or be unexported (golint)
    • Line 9: warning: exported type NoOpReadCloser should have comment or be unexported (golint)
    • Line 13: warning: exported method NoOpReadCloser.Close should have comment or be unexported (golint)
    • backend/s3afero/single.go
    • Line 41: warning: exported function SingleBucket should have comment or be unexported (golint)
    • Line 72: warning: exported method SingleBucketBackend.ListBuckets should have comment or be unexported (golint)
    • Line 94: warning: exported method SingleBucketBackend.ListBucket should have comment or be unexported (golint)
    • Line 111: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 200: warning: exported method SingleBucketBackend.HeadObject should have comment or be unexported (golint)
    • Line 231: warning: exported method SingleBucketBackend.GetObject should have comment or be unexported (golint)
    • Line 288: warning: exported method SingleBucketBackend.PutObject should have comment or be unexported (golint)
    • Line 357: warning: exported method SingleBucketBackend.DeleteMulti should have comment or be unexported (golint)
    • Line 383: warning: exported method SingleBucketBackend.DeleteObject should have comment or be unexported (golint)
    • Line 419: warning: exported method SingleBucketBackend.BucketExists should have comment or be unexported (golint)
    • backend.go
    • Line 8: warning: exported const DefaultBucketVersionKeys should have comment (or a comment on this block) or be unexported (golint)
    • Line 31: warning: exported type ObjectList should have comment or be unexported (golint)
    • Line 43: warning: exported function NewObjectList should have comment or be unexported (golint)
    • Line 47: warning: exported method ObjectList.Add should have comment or be unexported (golint)
    • Line 51: warning: exported method ObjectList.AddPrefix should have comment or be unexported (golint)
    • Line 61: warning: exported type ObjectDeleteResult should have comment or be unexported (golint)
    • Line 74: warning: exported type ListBucketVersionsPage should have comment or be unexported (golint)
    • Line 96: warning: exported type ListBucketPage should have comment or be unexported (golint)
    • Line 115: warning: exported method ListBucketPage.IsEmpty should have comment or be unexported (golint)
    • Line 119: warning: exported type PutObjectResult should have comment or be unexported (golint)
    • error.go
    • Line 131: warning: exported type Error should have comment or be unexported (golint)
    • Line 169: warning: exported method ErrorResponse.ErrorCode should have comment or be unexported (golint)
    • Line 175: warning: receiver name r should be consistent with previous receiver name e for ErrorResponse (golint)
    • Line 179: warning: exported function ErrorMessage should have comment or be unexported (golint)
    • Line 183: warning: exported function ErrorMessagef should have comment or be unexported (golint)
    • Line 187: warning: exported type ErrorInvalidArgumentResponse should have comment or be unexported (golint)
    • Line 194: warning: exported function ErrorInvalidArgument should have comment or be unexported (golint)
    • Line 204: warning: exported method ErrorCode.ErrorCode should have comment or be unexported (golint)
    • Line 211: warning: exported method InternalErrorCode.ErrorCode should have comment or be unexported (golint)
    • Line 233: warning: exported method ErrorCode.Status should have comment or be unexported (golint)
    • Line 319: warning: exported function ResourceError should have comment or be unexported (golint)
    • Line 326: warning: exported function BucketNotFound should have comment or be unexported (golint)
    • Line 327: warning: exported function KeyNotFound should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign98%

IneffAssign detects ineffectual assignments in Go code.


misspell96%

Misspell Finds commonly misspelled English words

    • backend/s3afero/multi.go
    • Line 281: warning: "slighly" is a misspelling of "slightly" (misspell)
    • Line 318: warning: "slighly" is a misspelling of "slightly" (misspell)
    • Line 386: warning: "slighly" is a misspelling of "slightly" (misspell)
    • Line 454: warning: "slighly" is a misspelling of "slightly" (misspell)
    • Line 485: warning: "slighly" is a misspelling of "slightly" (misspell)