Preparing report...

Report for github.com/gobwas/ws

A+    Excellent!    Found 12 issues across 59 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!


gocyclo83%

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.

    • ws/server.go
    • Line 418: warning: cyclomatic complexity 53 of function (Upgrader).Upgrade() is high (> 15) (gocyclo)
    • Line 155: warning: cyclomatic complexity 36 of function (HTTPUpgrader).Upgrade() is high (> 15) (gocyclo)
    • ws/dialer.go
    • Line 277: warning: cyclomatic complexity 37 of function (Dialer).Upgrade() is high (> 15) (gocyclo)
    • ws/check.go
    • Line 76: warning: cyclomatic complexity 17 of function CheckHeader() is high (> 15) (gocyclo)
    • ws/http.go
    • Line 353: warning: cyclomatic complexity 17 of function httpWriteResponseError() is high (> 15) (gocyclo)

golint94%

Golint is a linter for Go source code.

    • ws/wsutil/extenstion.go
    • Line 14: warning: comment on exported method RecvExtensionFunc.UnsetBits should be of the form "UnsetBits ..." (golint)
    • Line 28: warning: comment on exported method SendExtensionFunc.SetBits should be of the form "SetBits ..." (golint)
    • ws/wsflate/parameters.go
    • Line 11: warning: exported const ExtensionName should have comment (or a comment on this block) or be unexported (golint)
    • Line 20: warning: exported var ExtensionNameBytes should have comment or be unexported (golint)
    • Line 59: warning: exported const MaxLZ77WindowSize should have comment (or a comment on this block) or be unexported (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!