Preparing report...

Report for github.com/dubbogo/getty

A+    Excellent!    Found 18 issues across 27 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!


golint33%

Golint is a linter for Go source code.

    • getty/demo/hello/messagelistener.go
    • Line 28: warning: exported type MessageHandler should have comment or be unexported (golint)
    • Line 32: warning: exported method MessageHandler.OnOpen should have comment or be unexported (golint)
    • Line 40: warning: exported method MessageHandler.OnError should have comment or be unexported (golint)
    • Line 44: warning: exported method MessageHandler.OnClose should have comment or be unexported (golint)
    • Line 48: warning: exported method MessageHandler.OnMessage should have comment or be unexported (golint)
    • Line 58: warning: exported method MessageHandler.OnCron should have comment or be unexported (golint)
    • getty/client.go
    • Line 101: warning: comment on exported function NewTCPClient should be of the form "NewTCPClient ..." (golint)
    • Line 106: warning: comment on exported function NewUDPClient should be of the form "NewUDPClient ..." (golint)
    • Line 111: warning: comment on exported function NewWSClient should be of the form "NewWSClient ..." (golint)
    • getty/logger.go
    • Line 38: warning: exported type LoggerLevel should have comment or be unexported (golint)
    • Line 41: warning: comment on exported const LoggerLevelDebug should be of the form "LoggerLevelDebug ..." (golint)
    • Line 44: warning: comment on exported const LoggerLevelInfo should be of the form "LoggerLevelInfo ..." (golint)
    • Line 46: warning: comment on exported const LoggerLevelWarn should be of the form "LoggerLevelWarn ..." (golint)
    • Line 49: warning: comment on exported const LoggerLevelError should be of the form "LoggerLevelError ..." (golint)
    • Line 52: warning: comment on exported const LoggerLevelDPanic should be of the form "LoggerLevelDPanic ..." (golint)
    • Line 55: warning: comment on exported const LoggerLevelPanic should be of the form "LoggerLevelPanic ..." (golint)
    • Line 57: warning: comment on exported const LoggerLevelFatal should be of the form "LoggerLevelFatal ..." (golint)
    • Line 100: warning: comment on exported function SetLogger should be of the form "SetLogger ..." (golint)
    • Line 110: warning: comment on exported function SetLoggerLevel should be of the form "SetLoggerLevel ..." (golint)
    • Line 122: warning: comment on exported function SetLoggerCallerDisable should be of the form "SetLoggerCallerDisable ..." (golint)
    • getty/options.go
    • Line 26: warning: exported type ServerOption should have comment or be unexported (golint)
    • Line 28: warning: exported type ServerOptions should have comment or be unexported (golint)
    • Line 42: warning: comment on exported function WithLocalAddress should be of the form "WithLocalAddress ..." (golint)
    • Line 49: warning: comment on exported function WithWebsocketServerPath should be of the form "WithWebsocketServerPath ..." (golint)
    • Line 56: warning: comment on exported function WithWebsocketServerCert should be of the form "WithWebsocketServerCert ..." (golint)
    • Line 63: warning: comment on exported function WithWebsocketServerPrivateKey should be of the form "WithWebsocketServerPrivateKey ..." (golint)
    • Line 70: warning: comment on exported function WithWebsocketServerRootCert should be of the form "WithWebsocketServerRootCert ..." (golint)
    • Line 77: warning: comment on exported function WithServerTaskPool should be of the form "WithServerTaskPool ..." (golint)
    • Line 84: warning: comment on exported function WithServerSslEnabled should be of the form "WithServerSslEnabled ..." (golint)
    • Line 91: warning: comment on exported function WithServerTlsConfigBuilder should be of the form "WithServerTlsConfigBuilder ..." (golint)
    • Line 102: warning: exported type ClientOption should have comment or be unexported (golint)
    • Line 104: warning: exported type ClientOptions should have comment or be unexported (golint)
    • Line 121: warning: comment on exported function WithServerAddress should be of the form "WithServerAddress ..." (golint)
    • Line 128: warning: comment on exported function WithReconnectInterval should be of the form "WithReconnectInterval ..." (golint)
    • Line 137: warning: comment on exported function WithClientTaskPool should be of the form "WithClientTaskPool ..." (golint)
    • Line 144: warning: comment on exported function WithConnectionNumber should be of the form "WithConnectionNumber ..." (golint)
    • Line 153: warning: comment on exported function WithRootCertificateFile should be of the form "WithRootCertificateFile ..." (golint)
    • Line 160: warning: comment on exported function WithClientSslEnabled should be of the form "WithClientSslEnabled ..." (golint)
    • Line 167: warning: comment on exported function WithClientTlsConfigBuilder should be of the form "WithClientTlsConfigBuilder ..." (golint)
    • getty/demo/hello/hello.go
    • Line 24: warning: exported var Sessions should have comment or be unexported (golint)
    • Line 26: warning: exported function ClientRequest should have comment or be unexported (golint)
    • getty/demo/util/pprof.go
    • Line 23: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • Line 26: warning: exported function Profiling should have comment or be unexported (golint)
    • getty/const.go
    • Line 25: warning: exported type EndPointID should have comment or be unexported (golint)
    • Line 26: warning: exported type EndPointType should have comment or be unexported (golint)
    • Line 30: warning: exported const UDP_ENDPOINT should have comment (or a comment on this block) or be unexported (golint)
    • Line 40: warning: don't use underscores in Go names; var EndPointType_name should be EndPointTypeName (golint)
    • Line 40: warning: exported var EndPointType_name should have comment or be unexported (golint)
    • Line 51: warning: don't use underscores in Go names; var EndPointType_value should be EndPointTypeValue (golint)
    • Line 51: warning: exported var EndPointType_value should have comment or be unexported (golint)
    • getty/getty.go
    • Line 99: warning: exported type CompressType should have comment or be unexported (golint)
    • Line 102: warning: exported const CompressNone should have comment (or a comment on this block) or be unexported (golint)
    • Line 114: warning: exported type Connection should have comment or be unexported (golint)
    • Line 144: warning: exported var ErrSessionClosed should have comment or be unexported (golint)
    • Line 149: warning: exported type Session should have comment or be unexported (golint)
    • Line 187: warning: exported type EndPoint should have comment or be unexported (golint)
    • Line 201: warning: exported type Client should have comment or be unexported (golint)
    • getty/server.go
    • Line 87: warning: comment on exported function NewUDPPEndPoint should be of the form "NewUDPPEndPoint ..." (golint)
    • getty/demo/util/signals.go
    • Line 26: warning: exported type Closer should have comment or be unexported (golint)
    • Line 30: warning: exported function WaitCloseSignals should have comment or be unexported (golint)

gocyclo100%

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.

No problems detected. Good job!


ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!