Preparing report...

Report for openpitrix.io/logger

A+    Excellent!    Found 4 issues across 14 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!


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!


golint78%

Golint is a linter for Go source code.

    • /openpitrix.io/logger/level.go
    • Line 11: warning: exported type Level should have comment or be unexported (golint)
    • Line 14: warning: exported const CriticalLevel should have comment (or a comment on this block) or be unexported (golint)
    • Line 38: warning: exported function StringToLevel should have comment or be unexported (golint)
    • /openpitrix.io/logger/logger.go
    • Line 30: warning: exported function SetLevelByString should have comment or be unexported (golint)
    • Line 35: warning: exported function Infof should have comment or be unexported (golint)
    • Line 39: warning: exported function Debugf should have comment or be unexported (golint)
    • Line 43: warning: exported function Warnf should have comment or be unexported (golint)
    • Line 47: warning: exported function Errorf should have comment or be unexported (golint)
    • Line 51: warning: exported function Criticalf should have comment or be unexported (golint)
    • Line 55: warning: exported function HideCallstack should have comment or be unexported (golint)
    • Line 58: warning: exported function ShowCallstack should have comment or be unexported (golint)
    • Line 62: warning: exported function SetOutput should have comment or be unexported (golint)
    • Line 66: warning: exported type Logger should have comment or be unexported (golint)
    • Line 73: warning: exported function New should have comment or be unexported (golint)
    • Line 84: warning: exported method Logger.SetLevel should have comment or be unexported (golint)
    • Line 87: warning: exported method Logger.SetLevelByString should have comment or be unexported (golint)
    • Line 94: warning: exported method Logger.HideCallstack should have comment or be unexported (golint)
    • Line 98: warning: exported method Logger.ShowCallstack should have comment or be unexported (golint)
    • Line 103: warning: exported method Logger.Debugf should have comment or be unexported (golint)
    • Line 108: warning: exported method Logger.Infof should have comment or be unexported (golint)
    • Line 113: warning: exported method Logger.Warnf should have comment or be unexported (golint)
    • Line 118: warning: exported method Logger.Errorf should have comment or be unexported (golint)
    • Line 123: warning: exported method Logger.Criticalf should have comment or be unexported (golint)
    • Line 128: warning: exported method Logger.SetOutput should have comment or be unexported (golint)
    • Line 133: warning: exported method Logger.WithDepth should have comment or be unexported (golint)
    • /openpitrix.io/logger/ctxutil/ctx.go
    • Line 15: warning: exported const MessageIdKey should have comment (or a comment on this block) or be unexported (golint)
    • Line 26: warning: exported function GetRequestId should have comment or be unexported (golint)
    • Line 33: warning: exported function SetRequestId should have comment or be unexported (golint)
    • Line 34: warning: should not use basic type string as key in context.WithValue (golint)
    • Line 42: warning: exported function ClearRequestId should have comment or be unexported (golint)
    • Line 46: warning: exported function GetMessageId should have comment or be unexported (golint)
    • Line 49: warning: exported function SetMessageId should have comment or be unexported (golint)
    • Line 50: warning: should not use basic type string as key in context.WithValue (golint)
    • Line 59: warning: exported function AppendMessageId should have comment or be unexported (golint)
    • Line 64: warning: exported function ClearMessageId should have comment or be unexported (golint)
    • Line 68: warning: exported function GetValue 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!


misspell92%

Misspell Finds commonly misspelled English words