Preparing report...

Report for github.com/dolab/redis-go

A+    Excellent!    Found 19 issues across 46 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!


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.


golint69%

Golint is a linter for Go source code.

    • redis-go/redistest/server.go
    • Line 20: warning: exported function TestServer should have comment or be unexported (golint)
    • Line 67: warning: exported function TestServerHandler should have comment or be unexported (golint)
    • Line 120: warning: exported function FakeServer should have comment or be unexported (golint)
    • Line 124: warning: exported function FakeTimeoutServer should have comment or be unexported (golint)
    • Line 166: warning: exported function FakeMetricsServer should have comment or be unexported (golint)
    • Line 211: warning: exported function FakeServerList should have comment or be unexported (golint)
    • redis-go/redistest/client.go
    • Line 65: warning: context.Context should be the first parameter of a function (golint)
    • Line 103: warning: context.Context should be the first parameter of a function (golint)
    • Line 167: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • redis-go/conn.go
    • Line 42: warning: comment on exported function DialContext should be of the form "DialContext ..." (golint)
    • redis-go/errors.go
    • Line 6: warning: comment on exported var ErrNil should be of the form "ErrNil ..." (golint)
    • Line 8: warning: exported var ErrNilArgs should have comment or be unexported (golint)
    • redis-go/response.go
    • Line 35: warning: exported method Response.IsRespArray should have comment or be unexported (golint)
    • Line 55: warning: comment on exported method Response.Retry should be of the form "Retry ..." (golint)
    • redis-go/metrics/context.go
    • Line 10: warning: exported method Metrics.Dialer should have comment or be unexported (golint)
    • Line 23: warning: exported method Metrics.IncConnection should have comment or be unexported (golint)
    • Line 36: warning: exported method Metrics.DecConnection should have comment or be unexported (golint)
    • Line 49: warning: exported method Metrics.IncRequest should have comment or be unexported (golint)
    • Line 66: warning: exported method Metrics.DecRequest should have comment or be unexported (golint)
    • Line 80: warning: exported method Metrics.IncCommands should have comment or be unexported (golint)
    • Line 100: warning: exported method Metrics.DecCommands should have comment or be unexported (golint)
    • Line 117: warning: exported method Metrics.IncBytesReceived should have comment or be unexported (golint)
    • Line 131: warning: exported method Metrics.IncBytesSend should have comment or be unexported (golint)
    • Line 145: warning: exported method Metrics.IncBytesWrite should have comment or be unexported (golint)
    • Line 159: warning: exported method Metrics.IncBytesRead should have comment or be unexported (golint)
    • Line 173: warning: exported method Metrics.ObserveProxy should have comment or be unexported (golint)
    • Line 186: warning: exported method Metrics.ObserveRedis should have comment or be unexported (golint)
    • Line 199: warning: exported method Metrics.ObserveRequest should have comment or be unexported (golint)
    • Line 212: warning: exported method Metrics.IncErrors should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign95%

IneffAssign detects ineffectual assignments in Go code.

    • redis-go/cmd/red/proxy.go
    • Line 22: warning: no required module provides package github.com/segmentio/stats/redisstats; to add it: (ineffassign)
    • Line 22: warning: could not import github.com/segmentio/stats/redisstats (invalid package name: "") (ineffassign)
    • Line 132: warning: cannot use makeConsulRegistry(u) (value of type *consulRegistry) as redis.ServerRegistry value in assignment: wrong type for method LookupServers (have func(ctx context.Context) ([]github.com/dolab/redis-go.ServerEndpoint, error), want func(ctx context.Context) (github.com/dolab/redis-go.ServerRing, error)) (ineffassign)
    • redis-go/cmd/red/test.go
    • Line 67: warning: cannot use time.Duration(config.Sleep) * time.Second (value of type time.Duration) as int value in argument to redistest.WriteTestPattern (ineffassign)
    • Line 74: warning: cannot use time.Duration(config.Sleep) * time.Second (value of type time.Duration) as int value in argument to redistest.ReadTestPattern (ineffassign)

misspell93%

Misspell Finds commonly misspelled English words

    • redis-go/conn_test.go
    • Line 185: warning: "excercise" is a misspelling of "exercise" (misspell)
    • Line 289: warning: "writen" is a misspelling of "written" (misspell)
    • Line 903: warning: "arugment" is a misspelling of "argument" (misspell)