Preparing report...

Report for github.com/wzshiming/emux

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

    • emux/session.go
    • Line 144: warning: cyclomatic complexity 32 of function (*Session).handleLoop() is high (> 15) (gocyclo)

golint41%

Golint is a linter for Go source code.

    • emux/conn.go
    • Line 14: warning: exported var ErrTimeout should have comment or be unexported (golint)
    • emux/emux.go
    • Line 9: warning: exported type ListenConfigSession should have comment or be unexported (golint)
    • Line 16: warning: exported function NewListenerConfig should have comment or be unexported (golint)
    • Line 23: warning: exported type DialerSession should have comment or be unexported (golint)
    • Line 33: warning: exported function NewDialer should have comment or be unexported (golint)
    • Line 40: warning: exported method DialerSession.DialContext should have comment or be unexported (golint)
    • Line 74: warning: exported method ListenConfigSession.Listen should have comment or be unexported (golint)
    • Line 89: warning: exported type ListenerSession should have comment or be unexported (golint)
    • Line 99: warning: exported function NewListener should have comment or be unexported (golint)
    • Line 156: warning: exported method ListenerSession.Accept should have comment or be unexported (golint)
    • Line 165: warning: exported method ListenerSession.Close should have comment or be unexported (golint)
    • Line 170: warning: exported method ListenerSession.Addr should have comment or be unexported (golint)
    • emux/encoding.go
    • Line 8: warning: exported type Encode should have comment or be unexported (golint)
    • Line 12: warning: exported function NewEncode should have comment or be unexported (golint)
    • Line 18: warning: exported method Encode.WriteUvarint should have comment or be unexported (golint)
    • Line 25: warning: exported method Encode.WriteBytes should have comment or be unexported (golint)
    • Line 36: warning: exported method Encode.WriteByte should have comment or be unexported (golint)
    • Line 42: warning: exported method Encode.WriteCmd should have comment or be unexported (golint)
    • Line 50: warning: exported method Encode.Flush should have comment or be unexported (golint)
    • Line 57: warning: exported type Decode should have comment or be unexported (golint)
    • Line 61: warning: exported function NewDecode should have comment or be unexported (golint)
    • Line 67: warning: exported method Decode.ReadUvarint should have comment or be unexported (golint)
    • Line 71: warning: exported method Decode.ReadBytes should have comment or be unexported (golint)
    • Line 84: warning: exported method Decode.WriteTo should have comment or be unexported (golint)
    • Line 97: warning: exported method Decode.ReadByte should have comment or be unexported (golint)
    • emux/handshake.go
    • Line 20: warning: exported type Handshake should have comment or be unexported (golint)
    • Line 30: warning: exported function NewHandshake should have comment or be unexported (golint)
    • emux/session.go
    • Line 12: warning: exported type Session should have comment or be unexported (golint)
    • Line 32: warning: exported function NewSession should have comment or be unexported (golint)
    • Line 52: warning: exported method Session.IsClosed should have comment or be unexported (golint)
    • Line 56: warning: exported method Session.Close should have comment or be unexported (golint)
    • Line 71: warning: exported method Session.Accept should have comment or be unexported (golint)
    • Line 82: warning: exported method Session.Open should have comment or be unexported (golint)
    • emux/cmd.go
    • Line 3: warning: comment on exported type Cmd should be of the form "Cmd ..." (with optional leading article) (golint)
    • Line 23: warning: exported const CmdConnect 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!