Preparing report...

Report for github.com/couchbaselabs/sgload

A    Great!    Found 29 issues across 37 files

Tweet

gofmt75%

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!


golint29%

Golint is a linter for Go source code.

    • sgload/sgload/expvar.go
    • Line 19: warning: comment on exported type ExpVarStatsCollector should be of the form "ExpVarStatsCollector ..." (with optional leading article) (golint)
    • Line 27: warning: comment on exported type NoOpExpvarStatsCollector should be of the form "NoOpExpvarStatsCollector ..." (with optional leading article) (golint)
    • Line 30: warning: exported method NoOpExpvarStatsCollector.Set should have comment or be unexported (golint)
    • Line 32: warning: exported method NoOpExpvarStatsCollector.Add should have comment or be unexported (golint)
    • sgload/sgload/gateload_runner.go
    • Line 10: warning: exported type GateLoadRunner should have comment or be unexported (golint)
    • Line 19: warning: exported function NewGateLoadRunner should have comment or be unexported (golint)
    • Line 59: warning: exported method GateLoadRunner.Run should have comment or be unexported (golint)
    • Line 157: warning: exported method GateLoadRunner.CreateAllSGUsersWaitGroup should have comment or be unexported (golint)
    • sgload/sgload/gateload_spec.go
    • Line 8: warning: exported type GateLoadSpec should have comment or be unexported (golint)
    • Line 15: warning: exported method GateLoadSpec.Validate should have comment or be unexported (golint)
    • Line 43: warning: comment on exported method GateLoadSpec.MustValidate should be of the form "MustValidate ..." (golint)
    • sgload/sgload/sg_datastore.go
    • Line 97: warning: exported type SGDataStore should have comment or be unexported (golint)
    • Line 105: warning: exported function NewSGDataStore should have comment or be unexported (golint)
    • Line 117: warning: exported method SGDataStore.SetUserCreds should have comment or be unexported (golint)
    • Line 121: warning: exported method SGDataStore.CreateUser should have comment or be unexported (golint)
    • Line 230: warning: exported method SGDataStore.Changes should have comment or be unexported (golint)
    • Line 279: warning: comment on exported method SGDataStore.CreateDocument should be of the form "CreateDocument ..." (golint)
    • Line 406: warning: comment on exported method SGDataStore.CreateDocumentNoAttachment should be of the form "CreateDocumentNoAttachment ..." (golint)
    • Line 490: warning: comment on exported method SGDataStore.BulkCreateDocuments should be of the form "BulkCreateDocuments ..." (golint)
    • Line 570: warning: exported method SGDataStore.BulkCreateDocumentsRetry should have comment or be unexported (golint)
    • Line 684: warning: exported method SGDataStore.BulkGetDocuments should have comment or be unexported (golint)
    • sgload/cmd/common.go
    • Line 9: warning: exported const NUM_READERS_CMD_NAME should have comment (or a comment on this block) or be unexported (golint)
    • sgload/sgsimulator/sgsimulator.go
    • Line 13: warning: exported type SGSimulator should have comment or be unexported (golint)
    • Line 17: warning: exported type BulkDocsResponse should have comment or be unexported (golint)
    • Line 22: warning: exported function HomeHandler should have comment or be unexported (golint)
    • Line 26: warning: exported function DoNothingHandler should have comment or be unexported (golint)
    • Line 30: warning: exported function BulkDocsHandler should have comment or be unexported (golint)
    • Line 49: warning: exported function NewSGSimulator should have comment or be unexported (golint)
    • Line 55: warning: exported method SGSimulator.Run should have comment or be unexported (golint)
    • sgload/sgload/writeload_spec.go
    • Line 9: warning: exported type WriteLoadSpec should have comment or be unexported (golint)
    • Line 20: warning: exported method WriteLoadSpec.Validate should have comment or be unexported (golint)
    • Line 38: warning: comment on exported method WriteLoadSpec.MustValidate should be of the form "MustValidate ..." (golint)
    • sgload/sgload/writer.go
    • Line 8: warning: exported type WriterSpec should have comment or be unexported (golint)
    • Line 15: warning: exported type Writer should have comment or be unexported (golint)
    • Line 25: warning: exported function NewWriter should have comment or be unexported (golint)
    • Line 43: warning: exported method Writer.Run should have comment or be unexported (golint)
    • Line 143: warning: exported method Writer.SetApproxExpectedDocsWritten should have comment or be unexported (golint)
    • Line 161: warning: exported method Writer.AddToDataStore should have comment or be unexported (golint)
    • sgload/sgload/agent.go
    • Line 18: warning: exported type AgentSpec should have comment or be unexported (golint)
    • Line 31: warning: comment on exported type Agent should be of the form "Agent ..." (with optional leading article) (golint)
    • Line 78: warning: exported method Agent.SetStatsdClient should have comment or be unexported (golint)
    • Line 95: warning: exported method Agent.SetCreateUserSemaphore should have comment or be unexported (golint)
    • sgload/sgload/log.go
    • Line 17: warning: exported function Logger should have comment or be unexported (golint)
    • Line 21: warning: exported function SetLogLevel should have comment or be unexported (golint)
    • sgload/sgload/updateload_spec.go
    • Line 8: warning: exported type UpdateLoadSpec should have comment or be unexported (golint)
    • Line 17: warning: exported method UpdateLoadSpec.Validate should have comment or be unexported (golint)
    • Line 24: warning: comment on exported method UpdateLoadSpec.MustValidate should be of the form "MustValidate ..." (golint)
    • sgload/sgload/load_runner.go
    • Line 9: warning: exported type LoadRunner should have comment or be unexported (golint)
    • Line 14: warning: exported method LoadRunner.CreateStatsdClient should have comment or be unexported (golint)
    • sgload/sgload/readload_runner.go
    • Line 10: warning: exported const USER_PREFIX_READER should have comment (or a comment on this block) or be unexported (golint)
    • Line 13: warning: exported type ReadLoadRunner should have comment or be unexported (golint)
    • Line 18: warning: exported function NewReadLoadRunner should have comment or be unexported (golint)
    • Line 34: warning: exported method ReadLoadRunner.Run should have comment or be unexported (golint)
    • sgload/sgload/writeload_runner.go
    • Line 9: warning: exported const USER_PREFIX_WRITER should have comment (or a comment on this block) or be unexported (golint)
    • Line 12: warning: exported type WriteLoadRunner should have comment or be unexported (golint)
    • Line 17: warning: exported function NewWriteLoadRunner should have comment or be unexported (golint)
    • Line 32: warning: exported method WriteLoadRunner.Run should have comment or be unexported (golint)
    • sgload/sgload/mockdatastore.go
    • Line 9: warning: exported type MockDataStore should have comment or be unexported (golint)
    • Line 11: warning: exported function NewMockDataStore should have comment or be unexported (golint)
    • Line 15: warning: exported method MockDataStore.CreateUser should have comment or be unexported (golint)
    • Line 20: warning: exported method MockDataStore.BulkCreateDocuments should have comment or be unexported (golint)
    • Line 25: warning: exported method MockDataStore.BulkCreateDocumentsRetry should have comment or be unexported (golint)
    • Line 29: warning: exported method MockDataStore.SetUserCreds should have comment or be unexported (golint)
    • Line 33: warning: exported method MockDataStore.Changes should have comment or be unexported (golint)
    • Line 37: warning: exported method MockDataStore.BulkGetDocuments should have comment or be unexported (golint)
    • Line 41: warning: exported method MockDataStore.CreateDocument should have comment or be unexported (golint)
    • sgload/sgload/reader.go
    • Line 11: warning: exported type Reader should have comment or be unexported (golint)
    • Line 23: warning: exported const CHANGES_LIMIT should have comment (or a comment on this block) or be unexported (golint)
    • Line 26: warning: exported function NewReader should have comment or be unexported (golint)
    • Line 42: warning: exported method Reader.SetFeedType should have comment or be unexported (golint)
    • Line 46: warning: exported method Reader.SetChannels should have comment or be unexported (golint)
    • Line 50: warning: exported method Reader.SetNumDocsExpected should have comment or be unexported (golint)
    • Line 55: warning: exported method Reader.SetNumRevGenerationsExpected should have comment or be unexported (golint)
    • Line 66: warning: exported method Reader.SetBatchSize should have comment or be unexported (golint)
    • Line 98: warning: comment on exported method Reader.Run should be of the form "Run ..." (golint)
    • Line 376: warning: comment on exported type RetrySleeper should be of the form "RetrySleeper ..." (with optional leading article) (golint)
    • Line 387: warning: error should be the last type when returning multiple items (golint)
    • Line 387: warning: exported function RetryLoop should have comment or be unexported (golint)
    • Line 414: warning: comment on exported function CreateDoublingSleeperFunc should be of the form "CreateDoublingSleeperFunc ..." (golint)
    • sgload/sgload/readload_spec.go
    • Line 5: warning: exported type ReadLoadSpec should have comment or be unexported (golint)
    • Line 16: warning: exported method ReadLoadSpec.Validate should have comment or be unexported (golint)
    • Line 25: warning: comment on exported method ReadLoadSpec.MustValidate should be of the form "MustValidate ..." (golint)
    • sgload/sgload/sg_datastore_changes_feed_params.go
    • Line 8: warning: exported type ChangesFeedType should have comment or be unexported (golint)
    • Line 10: warning: exported const FEED_TYPE_LONGPOLL should have comment or be unexported (golint)
    • Line 11: warning: exported const FEED_TYPE_NORMAL should have comment or be unexported (golint)
    • Line 13: warning: exported type ChangesFeedParams should have comment or be unexported (golint)
    • Line 22: warning: exported function NewChangesFeedParams should have comment or be unexported (golint)
    • Line 49: warning: exported type Sincer should have comment or be unexported (golint)
    • Line 55: warning: exported type StringSincer should have comment or be unexported (golint)
    • Line 59: warning: exported method StringSincer.Empty should have comment or be unexported (golint)
    • Line 67: warning: exported method StringSincer.Equals should have comment or be unexported (golint)
    • sgload/sgload/datastore.go
    • Line 13: warning: exported type DataStore should have comment or be unexported (golint)
    • Line 37: warning: exported type UserCred should have comment or be unexported (golint)
    • Line 42: warning: exported method UserCred.Empty should have comment or be unexported (golint)
    • Line 46: warning: exported type Document should have comment or be unexported (golint)
    • Line 48: warning: exported method Document.Id should have comment or be unexported (golint)
    • Line 56: warning: exported method Document.SetId should have comment or be unexported (golint)
    • Line 60: warning: exported method Document.Revision should have comment or be unexported (golint)
    • Line 68: warning: exported type AttachmentMeta should have comment or be unexported (golint)
    • Line 75: warning: comment on exported method Document.GenerateHtmlAttachmentContent should be of the form "GenerateHtmlAttachmentContent ..." (golint)
    • Line 85: warning: exported method Document.GenerateAndAddAttachmentMeta should have comment or be unexported (golint)
    • Line 107: warning: exported method Document.SetRevision should have comment or be unexported (golint)
    • Line 111: warning: exported method Document.GetBodySizeBytes should have comment or be unexported (golint)
    • Line 121: warning: comment on exported method Document.SetRevisions should be of the form "SetRevisions ..." (golint)
    • Line 130: warning: exported method Document.Copy should have comment or be unexported (golint)
    • Line 138: warning: exported function DocumentFromSGReplicateDocument should have comment or be unexported (golint)
    • Line 145: warning: exported method Document.SetChannels should have comment or be unexported (golint)
    • Line 149: warning: exported type Change should have comment or be unexported (golint)
    • Line 151: warning: exported type BulkDocs should have comment or be unexported (golint)
    • Line 156: warning: comment on exported type DocumentRevisionPair should be of the form "DocumentRevisionPair ..." (with optional leading article) (golint)
    • sgload/sgload/loadspec.go
    • Line 10: warning: comment on exported type LoadSpec should be of the form "LoadSpec ..." (with optional leading article) (golint)
    • Line 31: warning: exported method LoadSpec.Validate should have comment or be unexported (golint)
    • Line 68: warning: exported function NewUuid should have comment or be unexported (golint)
    • sgload/sgload/mock_statsd.go
    • Line 5: warning: exported type MockStatter should have comment or be unexported (golint)
    • Line 7: warning: exported method MockStatter.Counter should have comment or be unexported (golint)
    • Line 9: warning: exported method MockStatter.Timing should have comment or be unexported (golint)
    • Line 11: warning: exported method MockStatter.Gauge should have comment or be unexported (golint)
    • sgload/sgload/updater.go
    • Line 10: warning: exported type UpdaterSpec should have comment or be unexported (golint)
    • Line 19: warning: exported type Updater should have comment or be unexported (golint)
    • Line 29: warning: exported type DocUpdateStatus should have comment or be unexported (golint)
    • Line 34: warning: exported function NewUpdater should have comment or be unexported (golint)
    • Line 74: warning: exported method Updater.Run should have comment or be unexported (golint)
    • Line 371: warning: exported method Updater.LookupCurrentRevisions should have comment or be unexported (golint)

gocyclo97%

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.


ineffassign94%

IneffAssign detects ineffectual assignments in Go code.

    • sgload/sgload/sg_datastore.go
    • Line 146: warning: ineffectual assignment to err (ineffassign)
    • Line 433: warning: ineffectual assignment to err (ineffassign)
    • Line 525: warning: ineffectual assignment to err (ineffassign)
    • Line 705: warning: ineffectual assignment to err (ineffassign)
    • Line 727: warning: ineffectual assignment to err (ineffassign)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!