Preparing report...

Report for github.com/timvaillancourt/go-mongodb-replset

A+    Excellent!    Found 7 issues across 12 files

Tweet

gofmt91%

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!


gocyclo100%

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.

No problems detected. Good job!


golint50%

Golint is a linter for Go source code.

    • go-mongodb-replset/status/member.go
    • Line 9: warning: exported type MemberHealth should have comment or be unexported (golint)
    • Line 10: warning: exported type MemberState should have comment or be unexported (golint)
    • Line 13: warning: exported const MemberHealthDown should have comment (or a comment on this block) or be unexported (golint)
    • Line 27: warning: exported var MemberStateStrings should have comment or be unexported (golint)
    • Line 47: warning: exported type Member should have comment or be unexported (golint)
    • Line 69: warning: exported method Status.GetSelf should have comment or be unexported (golint)
    • Line 78: warning: exported method Status.GetMember should have comment or be unexported (golint)
    • Line 87: warning: exported method Status.HasMember should have comment or be unexported (golint)
    • Line 91: warning: exported method Status.GetMemberId should have comment or be unexported (golint)
    • Line 100: warning: exported method Status.GetMembersByState should have comment or be unexported (golint)
    • Line 113: warning: exported method Status.Primary should have comment or be unexported (golint)
    • Line 121: warning: exported method Status.Secondaries should have comment or be unexported (golint)
    • go-mongodb-replset/status/status.go
    • Line 13: warning: exported const StatusCommand should have comment (or a comment on this block) or be unexported (golint)
    • Line 29: warning: exported type Optime should have comment or be unexported (golint)
    • Line 34: warning: exported type StatusOptimes should have comment or be unexported (golint)
    • Line 40: warning: exported type Status should have comment or be unexported (golint)
    • Line 52: warning: exported function New should have comment or be unexported (golint)
    • Line 64: warning: exported method Status.ToJSON should have comment or be unexported (golint)
    • go-mongodb-replset/config/config.go
    • Line 9: warning: exported const ConfigCommand should have comment or be unexported (golint)
    • Line 11: warning: comment on exported type WriteConcern should be of the form "WriteConcern ..." (with optional leading article) (golint)
    • Line 18: warning: comment on exported type OkResponse should be of the form "OkResponse ..." (with optional leading article) (golint)
    • Line 46: warning: comment on exported type ReplSetGetConfig should be of the form "ReplSetGetConfig ..." (with optional leading article) (golint)
    • Line 53: warning: comment on exported function NewConfig should be of the form "NewConfig ..." (golint)
    • Line 62: warning: comment on exported method Config.IncrVersion should be of the form "IncrVersion ..." (golint)
    • Line 67: warning: comment on exported method Config.ToJSON should be of the form "ToJSON ..." (golint)
    • go-mongodb-replset/config/manager.go
    • Line 12: warning: exported var ErrNoReplsetId should have comment or be unexported (golint)
    • Line 32: warning: exported type ConfigManager should have comment or be unexported (golint)
    • Line 39: warning: comment on exported function New should be of the form "New ..." (golint)
    • Line 63: warning: comment on exported method ConfigManager.GetMember should be of the form "GetMember ..." (golint)
    • Line 71: warning: comment on exported method ConfigManager.AddMember should be of the form "AddMember ..." (golint)
    • Line 79: warning: comment on exported method ConfigManager.RemoveMember should be of the form "RemoveMember ..." (golint)
    • Line 87: warning: comment on exported method ConfigManager.IncrVersion should be of the form "IncrVersion ..." (golint)
    • Line 114: warning: comment on exported method ConfigManager.IsInitiated should be of the form "IsInitiated ..." (golint)
    • go-mongodb-replset/config/member.go
    • Line 16: warning: comment on exported function NewMember should be of the form "NewMember ..." (golint)
    • Line 37: warning: comment on exported method Config.AddMember should be of the form "AddMember ..." (golint)
    • Line 51: warning: comment on exported method Config.RemoveMember should be of the form "RemoveMember ..." (golint)
    • Line 61: warning: comment on exported method Config.GetMember should be of the form "GetMember ..." (golint)
    • Line 71: warning: comment on exported method Config.HasMember should be of the form "HasMember ..." (golint)
    • Line 76: warning: comment on exported method Config.GetMemberId should be of the form "GetMemberId ..." (golint)
    • go-mongodb-replset/config/replset_tags.go
    • Line 3: warning: comment on exported type ReplsetTags should be of the form "ReplsetTags ..." (with optional leading article) (golint)
    • Line 6: warning: comment on exported method ReplsetTags.HasKey should be of the form "HasKey ..." (golint)
    • Line 22: warning: comment on exported method ReplsetTags.Get should be of the form "Get ..." (golint)
    • Line 30: warning: comment on exported method ReplsetTags.Add should be of the form "Add ..." (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!


misspell91%

Misspell Finds commonly misspelled English words