Preparing report...

Report for github.com/UnderTreeTech/waterdrop

A+    Excellent!    Found 52 issues across 161 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!


gocyclo98%

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.


golint68%

Golint is a linter for Go source code.

    • waterdrop/pkg/conf/conf.go
    • Line 46: warning: exported type Provider should have comment or be unexported (golint)
    • Line 51: warning: exported type Parser should have comment or be unexported (golint)
    • Line 61: warning: exported function Init should have comment or be unexported (golint)
    • Line 84: warning: exported function Unmarshal should have comment or be unexported (golint)
    • Line 88: warning: exported function KeyMap should have comment or be unexported (golint)
    • Line 92: warning: exported function OnChange should have comment or be unexported (golint)
    • Line 96: warning: exported type Config should have comment or be unexported (golint)
    • Line 104: warning: exported function New should have comment or be unexported (golint)
    • Line 112: warning: exported method Config.SetDelimiter should have comment or be unexported (golint)
    • Line 116: warning: exported method Config.GetKeyMap should have comment or be unexported (golint)
    • Line 120: warning: exported method Config.OnChange should have comment or be unexported (golint)
    • waterdrop/pkg/utils/xtime/time.go
    • Line 24: warning: exported const DateFormat should have comment (or a comment on this block) or be unexported (golint)
    • Line 28: warning: exported type Time should have comment or be unexported (golint)
    • Line 39: warning: comment on exported method Time.CurrentUnixTime should be of the form "CurrentUnixTime ..." (golint)
    • Line 44: warning: comment on exported method Time.CurrentMilliTime should be of the form "CurrentMilliTime ..." (golint)
    • Line 49: warning: comment on exported method Time.CurrentNanoTime should be of the form "CurrentNanoTime ..." (golint)
    • waterdrop/pkg/utils/xstring/string.go
    • Line 36: warning: comment on exported function GetLocaleLng should be of the form "GetLocaleLng ..." (golint)
    • Line 51: warning: comment on exported function StripContentType should be of the form "StripContentType ..." (golint)
    • Line 76: warning: comment on exported function RandomString should be of the form "RandomString ..." (golint)
    • waterdrop/pkg/utils/xcollection/lru.go
    • Line 26: warning: comment on exported type LRUCache should be of the form "LRUCache ..." (with optional leading article) (golint)
    • Line 42: warning: exported type Key should have comment or be unexported (golint)
    • Line 49: warning: comment on exported function NewLRU should be of the form "NewLRU ..." (golint)
    • waterdrop/pkg/server/rpc/client/client.go
    • Line 122: warning: comment on exported method Client.WithUnaryServerChain should be of the form "WithUnaryServerChain ..." (golint)
    • Line 150: warning: comment on exported method Client.GetBreakers should be of the form "GetBreakers ..." (golint)
    • waterdrop/pkg/trace/trace.go
    • Line 33: warning: exported type NullStartSpanOption should have comment or be unexported (golint)
    • Line 35: warning: exported method NullStartSpanOption.Apply should have comment or be unexported (golint)
    • waterdrop/pkg/trace/jaeger/jaeger.go
    • Line 35: warning: comment on exported type JaegerConfig should be of the form "JaegerConfig ..." (with optional leading article) (golint)
    • Line 44: warning: comment on exported type Config should be of the form "Config ..." (with optional leading article) (golint)
    • waterdrop/pkg/utils/xcollection/priorityqueue.go
    • Line 23: warning: exported type Item should have comment or be unexported (golint)
    • Line 29: warning: comment on exported type PriorityQueue should be of the form "PriorityQueue ..." (with optional leading article) (golint)
    • Line 33: warning: exported function NewPriorityQueue should have comment or be unexported (golint)
    • waterdrop/pkg/status/status.go
    • Line 40: warning: comment on exported var OK should be of the form "OK ..." (golint)
    • Line 42: warning: exported var RequestErr should have comment or be unexported (golint)
    • Line 181: warning: comment on exported function ExtractStatus should be of the form "ExtractStatus ..." (golint)
    • waterdrop/pkg/utils/xcrypto/util.go
    • Line 29: warning: comment on exported type HashMode should be of the form "HashMode ..." (with optional leading article) (golint)
    • Line 33: warning: exported const MD5 should have comment (or a comment on this block) or be unexported (golint)
    • Line 43: warning: exported const PlainText should have comment (or a comment on this block) or be unexported (golint)

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!