Preparing report...

Report for github.com/dmskys/go-socket.io

(v1.6.3)

A+    Excellent!    Found 18 issues across 84 files

Tweet

gofmt97%

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!


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.

    • parser/encoder.go
    • Line 61: warning: cyclomatic complexity 22 of function (*Encoder).writePacket() is high (> 15) (gocyclo)

golint80%

Golint is a linter for Go source code.

    • parser/decoder.go
    • Line 18: warning: exported type FrameReader should have comment or be unexported (golint)
    • Line 29: warning: exported type Decoder should have comment or be unexported (golint)
    • Line 39: warning: exported function NewDecoder should have comment or be unexported (golint)
    • Line 45: warning: exported method Decoder.Close should have comment or be unexported (golint)
    • Line 56: warning: exported method Decoder.DiscardLast should have comment or be unexported (golint)
    • Line 65: warning: exported method Decoder.DecodeHeader should have comment or be unexported (golint)
    • Line 101: warning: exported method Decoder.DecodeArgs should have comment or be unexported (golint)
    • parser/errors.go
    • Line 6: warning: exported var ErrInvalidPacketType should have comment or be unexported (golint)
    • engineio/session/session.go
    • Line 23: warning: exported type Session should have comment or be unexported (golint)
    • Line 33: warning: exported function New should have comment or be unexported (golint)
    • Line 50: warning: exported method Session.SetContext should have comment or be unexported (golint)
    • Line 54: warning: exported method Session.Context should have comment or be unexported (golint)
    • Line 58: warning: exported method Session.ID should have comment or be unexported (golint)
    • Line 62: warning: exported method Session.Transport should have comment or be unexported (golint)
    • Line 69: warning: exported method Session.Close should have comment or be unexported (golint)
    • Line 128: warning: exported method Session.URL should have comment or be unexported (golint)
    • Line 135: warning: exported method Session.LocalAddr should have comment or be unexported (golint)
    • Line 142: warning: exported method Session.RemoteAddr should have comment or be unexported (golint)
    • Line 149: warning: exported method Session.RemoteHeader should have comment or be unexported (golint)
    • Line 163: warning: exported method Session.Upgrade should have comment or be unexported (golint)
    • Line 167: warning: exported method Session.InitSession should have comment or be unexported (golint)
    • engineio/session/session_manager.go
    • Line 7: warning: exported type Manager should have comment or be unexported (golint)
    • Line 14: warning: exported function NewManager should have comment or be unexported (golint)
    • Line 24: warning: exported method Manager.Add should have comment or be unexported (golint)
    • Line 31: warning: exported method Manager.Get should have comment or be unexported (golint)
    • Line 38: warning: exported method Manager.Remove should have comment or be unexported (golint)
    • Line 48: warning: exported method Manager.Count should have comment or be unexported (golint)
    • engineio/packet/decoder.go
    • Line 14: warning: exported type Decoder should have comment or be unexported (golint)
    • Line 18: warning: exported function NewDecoder should have comment or be unexported (golint)
    • Line 24: warning: exported method Decoder.NextReader should have comment or be unexported (golint)
    • engineio/packet/encoder.go
    • Line 14: warning: exported type Encoder should have comment or be unexported (golint)
    • Line 18: warning: exported function NewEncoder should have comment or be unexported (golint)
    • Line 24: warning: exported method Encoder.NextWriter should have comment or be unexported (golint)
    • engineio/packet/fake_reader.go
    • Line 15: warning: exported function NewFakeConnReader should have comment or be unexported (golint)
    • Line 44: warning: exported function NewFakeConstReader should have comment or be unexported (golint)
    • engineio/packet/types.go
    • Line 7: warning: exported type Frame should have comment or be unexported (golint)
    • Line 12: warning: exported type Packet should have comment or be unexported (golint)
    • engineio/packet/fake_discarder.go
    • Line 19: warning: exported type FakeDiscardWriter should have comment or be unexported (golint)
    • Line 21: warning: exported method FakeDiscardWriter.NextWriter should have comment or be unexported (golint)
    • parser/encoder.go
    • Line 11: warning: exported type FrameWriter should have comment or be unexported (golint)
    • Line 15: warning: exported type Encoder should have comment or be unexported (golint)
    • Line 19: warning: exported function NewEncoder should have comment or be unexported (golint)
    • Line 25: warning: exported method Encoder.Encode should have comment 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!