Preparing report...

Report for github.com/xtracdev/xavi

A+    Excellent!    Found 30 issues across 123 files

Tweet

gofmt98%

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!


gocyclo99%

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.


golint80%

Golint is a linter for Go source code.

    • xavi/config/customhc.go
    • Line 14: warning: exported var ErrNoSuchServer should have comment or be unexported (golint)
    • Line 15: warning: exported var ErrNoHealthCheckFn should have comment or be unexported (golint)
    • Line 16: warning: exported var ErrNoSuchBackend should have comment or be unexported (golint)
    • xavi/plugin/multiroute_test.go
    • Line 76: warning: should not use basic type int as key in context.WithValue (golint)
    • Line 96: warning: should not use basic type int as key in context.WithValue (golint)
    • Line 186: warning: should not use basic type int as key in context.WithValue (golint)
    • xavi/internal/testsupport/common.go
    • Line 6: warning: should not use dot imports (golint)
    • Line 20: warning: exported var XaviAgentRESTEnpointBaseURI should have comment or be unexported (golint)
    • Line 71: warning: exported function GetTestEndpointWithHeader should have comment or be unexported (golint)
    • Line 92: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 258: warning: exported function GetPortFromURL should have comment or be unexported (golint)
    • Line 290: warning: exported const XaviTestContainer should have comment (or a comment on this block) or be unexported (golint)
    • xavi/runner/runner.go
    • Line 14: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • Line 20: warning: comment on exported var BuildVersion should be of the form "BuildVersion ..." (golint)
    • Line 115: warning: exported function AddKVSCallbackFunction should have comment or be unexported (golint)
    • xavi/service/health.go
    • Line 16: warning: exported function ActiveHealthCheckContextForListener should have comment or be unexported (golint)
    • Line 20: warning: exported function RecordActiveHealthCheckContext should have comment or be unexported (golint)
    • Line 71: warning: comment on exported method HealthCheckContext.GetHealthStatus should be of the form "GetHealthStatus ..." (golint)
    • xavi/env/env.go
    • Line 26: warning: comment on exported const PProfEndpoint should be of the form "PProfEndpoint ..." (golint)
    • xavi/internal/testsupport/mountebank.go
    • Line 3: warning: comment on exported const RoundRobin3000Config should be of the form "RoundRobin3000Config ..." (golint)
    • Line 33: warning: comment on exported const RoundRobin3100Config should be of the form "RoundRobin3100Config ..." (golint)
    • xavi/plugin/httpsctx.go
    • Line 9: warning: exported function AddUseHttpsToContext should have comment or be unexported (golint)
    • Line 10: warning: should not use basic type int as key in context.WithValue (golint)
    • Line 13: warning: exported function GetUseHttpsContext should have comment or be unexported (golint)
    • xavi/plugin/timing/timingplugin.go
    • Line 21: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • Line 72: warning: exported type TimingWrapper should have comment or be unexported (golint)
    • xavi/loadbalancer/lbutils.go
    • Line 14: warning: exported type BackendLoadBalancer should have comment or be unexported (golint)
    • Line 22: warning: exported var ErrBackendNotFound should have comment or be unexported (golint)
    • Line 78: warning: comment on exported function NewBackendLoadBalancer should be of the form "NewBackendLoadBalancer ..." (golint)
    • Line 118: warning: exported method BackendLoadBalancer.DoWithLoadBalancer should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign96%

IneffAssign detects ineffectual assignments in Go code.


misspell95%

Misspell Finds commonly misspelled English words