Preparing report...

Report for github.com/lafikl/liblb

A+    Excellent!    Found 10 issues across 14 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!


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!


golint57%

Golint is a linter for Go source code.

    • liblb/liblb.go
    • Line 5: warning: exported type Balancer should have comment or be unexported (golint)
    • Line 12: warning: exported type KeyedBalancer should have comment or be unexported (golint)
    • Line 19: warning: exported var ErrNoHost should have comment or be unexported (golint)
    • liblb/consistent/consistent.go
    • Line 1: warning: package comment should be of the form "Package consistent ..." (golint)
    • Line 24: warning: exported type Consistent should have comment or be unexported (golint)
    • Line 28: warning: exported function New should have comment or be unexported (golint)
    • Line 36: warning: exported method Consistent.Add should have comment or be unexported (golint)
    • Line 40: warning: exported method Consistent.Remove should have comment or be unexported (golint)
    • Line 44: warning: exported method Consistent.Balance should have comment or be unexported (golint)
    • Line 44: warning: receiver name h should be consistent with previous receiver name c for Consistent (golint)
    • liblb/bounded/bounded.go
    • Line 1: warning: package comment should be of the form "Package bounded ..." (golint)
    • Line 37: warning: exported type Bounded should have comment or be unexported (golint)
    • Line 41: warning: exported function New should have comment or be unexported (golint)
    • Line 51: warning: exported method Bounded.Add should have comment or be unexported (golint)
    • Line 55: warning: exported method Bounded.Remove should have comment or be unexported (golint)
    • Line 59: warning: comment on exported method Bounded.Balance should be of the form "Balance ..." (golint)
    • Line 69: warning: comment on exported method Bounded.Inc should be of the form "Inc ..." (golint)
    • Line 75: warning: comment on exported method Bounded.Done should be of the form "Done ..." (golint)
    • Line 80: warning: exported method Bounded.Loads should have comment or be unexported (golint)
    • Line 84: warning: comment on exported method Bounded.MaxLoad should be of the form "MaxLoad ..." (golint)
    • liblb/r2/r2.go
    • Line 1: warning: package comment should be of the form "Package r2 ..." (golint)
    • Line 17: warning: exported type R2 should have comment or be unexported (golint)
    • Line 24: warning: exported function New should have comment or be unexported (golint)
    • Line 28: warning: comment on exported method R2.Add should be of the form "Add ..." (golint)
    • Line 41: warning: comment on exported method R2.AddWeight should be of the form "AddWeight ..." (golint)
    • Line 59: warning: comment on exported method R2.Exists should be of the form "Exists ..." (golint)
    • Line 73: warning: exported method R2.Remove should have comment or be unexported (golint)
    • Line 84: warning: exported method R2.Balance should have comment or be unexported (golint)
    • liblb/p2c/p2c.go
    • Line 1: warning: package comment should be of the form "Package p2c ..." (golint)
    • Line 31: warning: exported type P2C should have comment or be unexported (golint)
    • Line 54: warning: exported method P2C.Add should have comment or be unexported (golint)
    • Line 63: warning: exported method P2C.Remove should have comment or be unexported (golint)
    • Line 130: warning: comment on exported method P2C.Done should be of the form "Done ..." (golint)
    • Line 157: warning: comment on exported method P2C.GetLoad should be of the form "GetLoad ..." (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign42%

IneffAssign detects ineffectual assignments in Go code.

    • liblb/r2/r2.go
    • Line 14: warning: cannot find package "." in: (ineffassign)
    • Line 14: warning: could not import github.com/lafikl/liblb (invalid package name: "") (ineffassign)
    • Line 14: warning: could not import github.com/lafikl/liblb (invalid package name: "") (ineffassign)
    • liblb/consistent/consistent.go
    • Line 20: warning: cannot find package "." in: (ineffassign)
    • Line 21: warning: cannot find package "." in: (ineffassign)
    • Line 20: warning: could not import github.com/lafikl/consistent (invalid package name: "") (ineffassign)
    • Line 21: warning: could not import github.com/lafikl/liblb (invalid package name: "") (ineffassign)
    • Line 20: warning: could not import github.com/lafikl/consistent (invalid package name: "") (ineffassign)
    • Line 21: warning: could not import github.com/lafikl/liblb (invalid package name: "") (ineffassign)
    • liblb/p2c/p2c.go
    • Line 22: warning: cannot find package "." in: (ineffassign)
    • Line 23: warning: cannot find package "." in: (ineffassign)
    • Line 22: warning: could not import github.com/lafikl/liblb (invalid package name: "") (ineffassign)
    • Line 23: warning: could not import github.com/lafikl/liblb/murmur (invalid package name: "") (ineffassign)
    • Line 22: warning: could not import github.com/lafikl/liblb (invalid package name: "") (ineffassign)
    • Line 23: warning: could not import github.com/lafikl/liblb/murmur (invalid package name: "") (ineffassign)
    • liblb/bounded/bounded.go
    • Line 28: warning: cannot find package "." in: (ineffassign)
    • Line 29: warning: cannot find package "." in: (ineffassign)
    • Line 28: warning: could not import github.com/lafikl/consistent (invalid package name: "") (ineffassign)
    • Line 29: warning: could not import github.com/lafikl/liblb (invalid package name: "") (ineffassign)
    • Line 28: warning: could not import github.com/lafikl/consistent (invalid package name: "") (ineffassign)
    • Line 29: warning: could not import github.com/lafikl/liblb (invalid package name: "") (ineffassign)

misspell78%

Misspell Finds commonly misspelled English words