Preparing report...

Report for github.com/osgochina/dmicro

A+    Excellent!    Found 38 issues across 80 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!


gocyclo96%

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.


golint53%

Golint is a linter for Go source code.

    • dmicro/drpc/codec/plain_codec.go
    • Line 11: warning: exported const NamePlain should have comment (or a comment on this block) or be unexported (golint)
    • Line 32: warning: exported method PlainCodec.Marshal should have comment or be unexported (golint)
    • Line 54: warning: exported method PlainCodec.Unmarshal should have comment or be unexported (golint)
    • dmicro/drpc/socket/setting.go
    • Line 15: warning: exported var ErrProactivelyCloseSocket should have comment or be unexported (golint)
    • Line 49: warning: exported function TryOptimize should have comment or be unexported (golint)
    • dmicro/utils/dgpool/dgpool_filo.go
    • Line 18: warning: exported type FILOPool should have comment or be unexported (golint)
    • Line 51: warning: exported method FILOPool.MaxGoroutinesAmount should have comment or be unexported (golint)
    • Line 55: warning: exported method FILOPool.MaxGoroutineIdle should have comment or be unexported (golint)
    • Line 82: warning: exported method FILOPool.Stop should have comment or be unexported (golint)
    • Line 138: warning: exported var ErrLack should have comment or be unexported (golint)
    • dmicro/drpc/message.go
    • Line 10: warning: exported var TypeText should have comment or be unexported (golint)
    • Line 24: warning: exported var GetMessage should have comment or be unexported (golint)
    • Line 48: warning: exported var WithSetMetas should have comment or be unexported (golint)
    • Line 70: warning: exported function WithRealIP should have comment or be unexported (golint)
    • dmicro/drpc/socket/proto.go
    • Line 8: warning: exported type Proto should have comment or be unexported (golint)
    • Line 9: warning: exported type ProtoFunc should have comment or be unexported (golint)
    • dmicro/drpc/helper.go
    • Line 88: warning: exported method FakeAddr.Network should have comment or be unexported (golint)
    • Line 96: warning: exported method FakeAddr.Host should have comment or be unexported (golint)
    • Line 100: warning: exported method FakeAddr.Port should have comment or be unexported (golint)
    • dmicro/drpc/endpoint.go
    • Line 20: warning: exported type BaseEndpoint should have comment or be unexported (golint)
    • Line 47: warning: exported type EarlyEndpoint should have comment or be unexported (golint)
    • Line 70: warning: exported type Endpoint should have comment or be unexported (golint)
    • Line 117: warning: exported function NewEndpoint should have comment or be unexported (golint)
    • Line 420: warning: exported var ErrListenClosed should have comment or be unexported (golint)
    • dmicro/drpc/router.go
    • Line 35: warning: exported type ServiceMethodMapper should have comment or be unexported (golint)
    • Line 37: warning: exported function SetServiceMethodMapper should have comment or be unexported (golint)
    • Line 83: warning: exported type SubRouter should have comment or be unexported (golint)
    • dmicro/drpc/proto/proto.go
    • Line 8: warning: exported type Message should have comment or be unexported (golint)
    • Line 10: warning: exported type Proto should have comment or be unexported (golint)
    • Line 16: warning: exported type IOWithReadBuffer should have comment or be unexported (golint)
    • Line 20: warning: exported type ProtoFunc should have comment or be unexported (golint)
    • dmicro/drpc/codec/xml_codec.go
    • Line 6: warning: exported const NameXml should have comment (or a comment on this block) or be unexported (golint)
    • Line 14: warning: exported type XMLCodec should have comment or be unexported (golint)
    • Line 26: warning: exported method XMLCodec.Marshal should have comment or be unexported (golint)
    • Line 30: warning: exported method XMLCodec.Unmarshal should have comment or be unexported (golint)
    • dmicro/logger/logger.go
    • Line 14: warning: exported function SetConfigWithMap should have comment or be unexported (golint)
    • Line 18: warning: exported function SetLevel should have comment or be unexported (golint)
    • Line 22: warning: exported function GetLevel should have comment or be unexported (golint)
    • Line 26: warning: exported function SetLevelStr should have comment or be unexported (golint)
    • Line 42: warning: comment on exported function Println should be of the form "Println ..." (golint)
    • Line 135: warning: exported function SetDebug should have comment or be unexported (golint)
    • Line 139: warning: exported function IsDebug should have comment or be unexported (golint)
    • dmicro/drpc/codec/form_codec.go
    • Line 14: warning: exported const NameForm should have comment (or a comment on this block) or be unexported (golint)
    • Line 35: warning: exported method FormCodec.Marshal should have comment or be unexported (golint)
    • Line 115: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 125: warning: exported method FormCodec.Unmarshal should have comment or be unexported (golint)
    • dmicro/drpc/codec/json_codec.go
    • Line 8: warning: exported const NameJson should have comment (or a comment on this block) or be unexported (golint)
    • Line 12: warning: exported type JSONCodec should have comment or be unexported (golint)
    • Line 14: warning: exported method JSONCodec.ID should have comment or be unexported (golint)
    • Line 18: warning: exported method JSONCodec.Name should have comment or be unexported (golint)
    • Line 22: warning: exported method JSONCodec.Marshal should have comment or be unexported (golint)
    • Line 26: warning: exported method JSONCodec.Unmarshal should have comment or be unexported (golint)
    • dmicro/drpc/dialer.go
    • Line 80: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 100: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • dmicro/drpc/status.go
    • Line 5: warning: exported type Status should have comment or be unexported (golint)
    • Line 8: warning: exported var NewStatus should have comment or be unexported (golint)
    • Line 46: warning: exported function CodeText should have comment or be unexported (golint)
    • dmicro/drpc/plugin/proxy/proxy.go
    • Line 10: warning: exported type Forwarder should have comment or be unexported (golint)
    • Line 15: warning: exported type CallForwarder should have comment or be unexported (golint)
    • Line 18: warning: exported type PushForwarder should have comment or be unexported (golint)
    • Line 21: warning: exported type Label should have comment or be unexported (golint)
    • dmicro/drpc/tfilter/tfilter.go
    • Line 29: warning: exported var ErrTransferFilterTooLong should have comment or be unexported (golint)
    • Line 125: warning: comment on exported method PipeTFilter.Names should be of the form "Names ..." (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!