Preparing report...

Report for github.com/lafikl/consistent

B    Not bad!    Found 2 issues across 3 files

Tweet

gofmt33%

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!


golint66%

Golint is a linter for Go source code.

    • consistent/consistent.go
    • Line 1: warning: package comment should be of the form "Package consistent ..." (golint)
    • Line 23: warning: exported var ErrNoHosts should have comment or be unexported (golint)
    • Line 25: warning: exported type Host should have comment or be unexported (golint)
    • Line 30: warning: exported type Consistent should have comment or be unexported (golint)
    • Line 39: warning: exported function New should have comment or be unexported (golint)
    • Line 47: warning: exported method Consistent.Add should have comment or be unexported (golint)
    • Line 71: warning: comment on exported method Consistent.Get should be of the form "Get ..." (golint)
    • Line 89: warning: comment on exported method Consistent.GetLeast should be of the form "GetLeast ..." (golint)
    • Line 132: warning: comment on exported method Consistent.UpdateLoad should be of the form "UpdateLoad ..." (golint)
    • Line 145: warning: comment on exported method Consistent.Inc should be of the form "Inc ..." (golint)
    • Line 156: warning: comment on exported method Consistent.Done should be of the form "Done ..." (golint)
    • Line 170: warning: comment on exported method Consistent.Remove should be of the form "Remove ..." (golint)
    • Line 184: warning: comment on exported method Consistent.Hosts should be of the form "Hosts ..." (golint)
    • Line 188: warning: should omit 2nd value from range; this loop is equivalent to `for k := range ...` (golint)
    • Line 194: warning: comment on exported method Consistent.GetLoads should be of the form "GetLoads ..." (golint)
    • Line 204: warning: comment on exported method Consistent.MaxLoad should be of the form "MaxLoad ..." (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!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!