Preparing report...

Report for github.com/couchbaselabs/sg-replicate

A    Great!    Found 15 issues across 20 files

Tweet

gofmt100%

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

No problems detected. Good job!


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.


golint25%

Golint is a linter for Go source code.

    • sg-replicate/cli/cli_parser.go
    • Line 11: warning: exported type ReplicationsConfig should have comment or be unexported (golint)
    • Line 17: warning: exported type ReplicationsConfigJson should have comment or be unexported (golint)
    • Line 23: warning: exported type ReplicationParametersJson should have comment or be unexported (golint)
    • Line 34: warning: exported method ReplicationsConfigJson.Export should have comment or be unexported (golint)
    • Line 50: 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 67: warning: exported method ReplicationParametersJson.Export should have comment or be unexported (golint)
    • Line 81: 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 102: warning: exported function ParseReplicationsConfig should have comment or be unexported (golint)
    • sg-replicate/replication_event.go
    • Line 3: warning: exported type ReplicationEventSignal should have comment or be unexported (golint)
    • Line 6: warning: exported const REPLICATION_UNKNOWN_SIGNAL should have comment (or a comment on this block) or be unexported (golint)
    • Line 26: warning: exported type ReplicationEvent should have comment or be unexported (golint)
    • Line 31: warning: exported function NewReplicationEvent should have comment or be unexported (golint)
    • sg-replicate/replication_state.go
    • Line 112: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 162: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 220: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • sg-replicate/changes_feed_parameters.go
    • Line 8: warning: exported const FEED_TYPE_LONGPOLL should have comment or be unexported (golint)
    • Line 9: warning: exported const FEED_TYPE_NORMAL should have comment or be unexported (golint)
    • Line 11: warning: exported type ChangesFeedParams should have comment or be unexported (golint)
    • Line 20: warning: exported function NewChangesFeedParams should have comment or be unexported (golint)
    • Line 30: warning: exported method ChangesFeedParams.FeedType should have comment or be unexported (golint)
    • Line 34: warning: exported method ChangesFeedParams.Limit should have comment or be unexported (golint)
    • Line 38: warning: exported method ChangesFeedParams.HeartbeatTimeMillis should have comment or be unexported (golint)
    • Line 42: warning: exported method ChangesFeedParams.FeedStyle should have comment or be unexported (golint)
    • Line 46: warning: exported method ChangesFeedParams.SequenceNumber should have comment or be unexported (golint)
    • sg-replicate/continuous_replication.go
    • Line 12: warning: exported type ContinuousReplicationEvent should have comment or be unexported (golint)
    • Line 15: warning: exported const UNKNOWN_EVENT should have comment (or a comment on this block) or be unexported (golint)
    • Line 28: warning: exported type ContinuousReplicationNotification should have comment or be unexported (golint)
    • Line 31: warning: exported const UNKNOWN_NOTIFICATION should have comment (or a comment on this block) or be unexported (golint)
    • Line 56: warning: comment on exported type ContinuousReplication should be of the form "ContinuousReplication ..." (with optional leading article) (golint)
    • Line 82: warning: exported type Runnable should have comment or be unexported (golint)
    • Line 86: warning: exported type ReplicationFactory should have comment or be unexported (golint)
    • Line 88: warning: exported function NewContinuousReplication should have comment or be unexported (golint)
    • Line 118: warning: exported method ContinuousReplication.Stop should have comment or be unexported (golint)
    • Line 123: warning: exported method ContinuousReplication.GetStats should have comment or be unexported (golint)
    • sg-replicate/synctube_test.go
    • Line 1402: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 1452: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • sg-replicate/sequence_number.go
    • Line 8: warning: exported const EMPTY_SEQUENCE_NUMBER should have comment or be unexported (golint)
    • Line 10: warning: exported function SequenceNumberToString should have comment or be unexported (golint)
    • sg-replicate/attachment.go
    • Line 10: warning: exported type Attachment should have comment or be unexported (golint)
    • Line 15: warning: exported function NewAttachment should have comment or be unexported (golint)
    • sg-replicate/replication_notification.go
    • Line 3: warning: exported type ReplicationStatus should have comment or be unexported (golint)
    • Line 6: warning: exported const REPLICATION_UNKNOWN_STATUS should have comment (or a comment on this block) or be unexported (golint)
    • Line 8: warning: comment on exported const REPLICATION_STOPPED should be of the form "REPLICATION_STOPPED ..." (golint)
    • Line 11: warning: comment on exported const REPLICATION_ABORTED should be of the form "REPLICATION_ABORTED ..." (golint)
    • Line 14: warning: comment on exported const REPLICATION_CANCELLED should be of the form "REPLICATION_CANCELLED ..." (golint)
    • Line 17: warning: comment on exported const REPLICATION_ACTIVE should be of the form "REPLICATION_ACTIVE ..." (golint)
    • Line 29: warning: exported type ReplicationNotification should have comment or be unexported (golint)
    • Line 35: warning: exported function NewReplicationNotification should have comment or be unexported (golint)
    • sg-replicate/replication_parameters.go
    • Line 9: warning: exported type ReplicationLifecycle should have comment or be unexported (golint)
    • Line 12: warning: exported const ONE_SHOT should have comment (or a comment on this block) or be unexported (golint)
    • Line 16: warning: exported method ReplicationLifecycle.UnmarshalJSON should have comment or be unexported (golint)
    • Line 32: warning: exported const DefaultChangesFeedLimit should have comment or be unexported (golint)
    • Line 34: warning: exported type ReplicationParameters should have comment or be unexported (golint)
    • Line 49: warning: exported method ReplicationParameters.GetSourceDbUrl should have comment or be unexported (golint)
    • Line 53: warning: exported method ReplicationParameters.GetTargetDbUrl should have comment or be unexported (golint)
    • Line 57: warning: exported method ReplicationParameters.Equals should have comment or be unexported (golint)
    • sg-replicate/replication_stats.go
    • Line 21: warning: exported function NewReplicationStats should have comment or be unexported (golint)
    • Line 51: warning: exported method AtomicBool.Get should have comment or be unexported (golint)
    • Line 55: warning: exported method AtomicBool.Set should have comment or be unexported (golint)
    • sg-replicate/rest_data.go
    • Line 11: warning: exported type Checkpoint should have comment or be unexported (golint)
    • Line 17: warning: exported type PushCheckpointResponse should have comment or be unexported (golint)
    • Line 22: warning: exported type ReplicationError should have comment or be unexported (golint)
    • Line 26: warning: exported function NewReplicationError should have comment or be unexported (golint)
    • Line 36: warning: exported method Checkpoint.IsEmpty should have comment or be unexported (golint)
    • Line 40: warning: exported type ChangedRev should have comment or be unexported (golint)
    • Line 44: warning: exported type Change should have comment or be unexported (golint)
    • Line 51: warning: exported type Changes should have comment or be unexported (golint)
    • Line 56: warning: exported type RevsDiffDocumentResponse should have comment or be unexported (golint)
    • Line 60: warning: exported type RevsDiffResponseMap should have comment or be unexported (golint)
    • Line 70: warning: exported type RevsDiffQueryMap should have comment or be unexported (golint)
    • Line 72: warning: exported type DocumentBody should have comment or be unexported (golint)
    • Line 74: warning: exported type Document should have comment or be unexported (golint)
    • Line 79: warning: exported method DocumentBody.ChannelNames should have comment or be unexported (golint)
    • Line 133: warning: exported type DocumentRevisionPair should have comment or be unexported (golint)
    • Line 141: warning: exported method DocumentRevisionPair.GetGeneration should have comment or be unexported (golint)
    • Line 150: warning: exported type BulkGetRequest should have comment or be unexported (golint)
    • Line 154: warning: exported type BulkDocsRequest should have comment or be unexported (golint)
    • Line 159: warning: exported type PushCheckpointRequest should have comment or be unexported (golint)
    • Line 210: warning: comment on exported type KeepDocFilter should be of the form "KeepDocFilter ..." (with optional leading article) (golint)
    • sg-replicate/synctube.go
    • Line 23: warning: comment on exported type SGReplication should be of the form "SGReplication ..." (with optional leading article) (golint)
    • Line 29: warning: exported type Replication should have comment or be unexported (golint)
    • Line 58: warning: exported function NewReplication should have comment or be unexported (golint)
    • Line 96: warning: exported method Replication.GetStats should have comment or be unexported (golint)
    • Line 100: warning: comment on exported function RunOneShotReplication should be of the form "RunOneShotReplication ..." (golint)
    • Line 108: warning: exported function StartOneShotReplication should have comment or be unexported (golint)
    • Line 115: warning: exported method Replication.WaitUntilDone should have comment or be unexported (golint)
    • Line 733: warning: comment on exported function ReadBulkGetResponse should be of the form "ReadBulkGetResponse ..." (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


misspell90%

Misspell Finds commonly misspelled English words