Preparing report...

Report for github.com/lesismal/nbio

A+    Excellent!    Found 25 issues across 79 files

Tweet

gofmt84%

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!


gocyclo91%

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.

    • nbio/nbhttp/server.go
    • Line 305: warning: cyclomatic complexity 27 of function NewServerTLS() is high (> 15) (gocyclo)
    • Line 155: warning: cyclomatic complexity 19 of function NewServer() is high (> 15) (gocyclo)

golint88%

Golint is a linter for Go source code.

    • nbio/mempool/mempool.go
    • Line 139: warning: comment on exported method NativeAllocator.Malloc should be of the form "Malloc ..." (golint)
    • Line 144: warning: comment on exported method NativeAllocator.Realloc should be of the form "Realloc ..." (golint)
    • Line 154: warning: comment on exported method NativeAllocator.Free should be of the form "Free ..." (golint)
    • Line 166: warning: exported function State should have comment or be unexported (golint)
    • nbio/nbhttp/http2.go
    • Line 19: warning: exported const H2HeaderLen should have comment (or a comment on this block) or be unexported (golint)
    • nbio/taskpool/mixedpool.go
    • Line 15: warning: exported type MixedPool should have comment or be unexported (golint)
    • Line 49: warning: comment on exported method MixedPool.Stop should be of the form "Stop ..." (golint)
    • nbio/nbhttp/websocket/conn.go
    • Line 26: warning: exported type Conn should have comment or be unexported (golint)
    • Line 65: warning: exported method Conn.SetCloseHandler should have comment or be unexported (golint)
    • Line 71: warning: exported method Conn.SetPingHandler should have comment or be unexported (golint)
    • Line 77: warning: exported method Conn.SetPongHandler should have comment or be unexported (golint)
    • Line 83: warning: exported method Conn.OnMessage should have comment or be unexported (golint)
    • Line 94: warning: exported method Conn.OnClose should have comment or be unexported (golint)
    • Line 100: warning: exported method Conn.WriteMessage should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign98%

IneffAssign detects ineffectual assignments in Go code.


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!