Preparing report...

Report for github.com/twxstar/gmqtt

(v0.5.0)

A+    Excellent!    Found 22 issues across 147 files

Tweet

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!


gofmt91%

Gofmt formats Go programs. We run gofmt -s on your code, where -s is for the "simplify" command


ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

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.

    • pkg/packets/properties.go
    • Line 333: warning: cyclomatic complexity 43 of function (*Properties).Unpack() is high (> 15) (gocyclo)
    • Line 275: warning: cyclomatic complexity 17 of function (*Properties).UnpackWillProperties() is high (> 15) (gocyclo)
    • pkg/packets/packets.go
    • Line 553: warning: cyclomatic complexity 39 of function TopicMatch() is high (> 15) (gocyclo)
    • Line 625: warning: cyclomatic complexity 21 of function TotalBytes() is high (> 15) (gocyclo)
    • Line 394: warning: cyclomatic complexity 16 of function NewPacket() is high (> 15) (gocyclo)
    • server/client.go
    • Line 826: warning: cyclomatic complexity 37 of function (*client).subscribeHandler() is high (> 15) (gocyclo)
    • Line 519: warning: cyclomatic complexity 27 of function (*client).connectWithTimeOut() is high (> 15) (gocyclo)
    • Line 985: warning: cyclomatic complexity 26 of function (*client).publishHandler() is high (> 15) (gocyclo)
    • Line 1291: warning: cyclomatic complexity 19 of function (*client).readHandle() is high (> 15) (gocyclo)
    • Line 298: warning: cyclomatic complexity 18 of function (*client).writeLoop() is high (> 15) (gocyclo)
    • server/stats.go
    • Line 183: warning: cyclomatic complexity 17 of function (*PacketStats).add() is high (> 15) (gocyclo)
    • server/server.go
    • Line 1123: warning: cyclomatic complexity 59 of function (*server).initPluginHooks() is high (> 15) (gocyclo)
    • Line 342: warning: cyclomatic complexity 31 of function (*server).registerClient() is high (> 15) (gocyclo)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


misspell99%

Misspell Finds commonly misspelled English words