Preparing report...

Report for github.com/lovego/logger

A+    Excellent!    Found 7 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!


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!


golint50%

Golint is a linter for Go source code.

    • logger/fields.go
    • Line 12: warning: exported type Fields should have comment or be unexported (golint)
    • Line 17: warning: comment on exported method Fields.With should be of the form "With ..." (golint)
    • Line 23: warning: exported method Fields.Debug should have comment or be unexported (golint)
    • Line 31: warning: exported method Fields.Debugf should have comment or be unexported (golint)
    • Line 38: warning: exported method Fields.Info should have comment or be unexported (golint)
    • Line 46: warning: exported method Fields.Infof should have comment or be unexported (golint)
    • Line 58: warning: exported method Fields.Errorf should have comment or be unexported (golint)
    • Line 63: warning: exported method Fields.Recover should have comment or be unexported (golint)
    • Line 70: warning: exported method Fields.Panic should have comment or be unexported (golint)
    • Line 77: warning: exported method Fields.Panicf should have comment or be unexported (golint)
    • Line 84: warning: exported method Fields.Fatal should have comment or be unexported (golint)
    • Line 90: warning: exported method Fields.Fatalf should have comment or be unexported (golint)
    • logger/formatter.go
    • Line 13: warning: exported type Formatter should have comment or be unexported (golint)
    • Line 59: warning: exported function PrintJson should have comment or be unexported (golint)
    • logger/logger.go
    • Line 12: warning: exported const Fatal should have comment (or a comment on this block) or be unexported (golint)
    • Line 20: warning: exported type Level should have comment or be unexported (golint)
    • Line 21: warning: exported type Logger should have comment or be unexported (golint)
    • Line 30: warning: exported type Alarm should have comment or be unexported (golint)
    • Line 35: warning: exported function New should have comment or be unexported (golint)
    • Line 54: warning: comment on exported method Logger.With should be of the form "With ..." (golint)
    • Line 59: warning: exported method Logger.Debug should have comment or be unexported (golint)
    • Line 66: warning: exported method Logger.Debugf should have comment or be unexported (golint)
    • Line 72: warning: exported method Logger.Info should have comment or be unexported (golint)
    • Line 79: warning: exported method Logger.Infof should have comment or be unexported (golint)
    • Line 89: warning: exported method Logger.Errorf should have comment or be unexported (golint)
    • Line 93: warning: exported method Logger.Recover should have comment or be unexported (golint)
    • Line 99: warning: exported method Logger.Panic should have comment or be unexported (golint)
    • Line 105: warning: exported method Logger.Panicf should have comment or be unexported (golint)
    • Line 111: warning: exported method Logger.Fatal should have comment or be unexported (golint)
    • Line 116: warning: exported method Logger.Fatalf should have comment or be unexported (golint)
    • logger/loggerfields.go
    • Line 18: warning: comment on exported method Logger.SetMachineIP should be of the form "SetMachineIP ..." (golint)
    • Line 33: warning: comment on exported method Logger.SetPid should be of the form "SetPid ..." (golint)
    • logger/loggeroutput.go
    • Line 76: warning: exported method Logger.SetLevel should have comment or be unexported (golint)
    • Line 86: warning: exported method Logger.SetAlarm should have comment or be unexported (golint)
    • logger/loggerrecord.go
    • Line 10: warning: exported method Logger.Record should have comment or be unexported (golint)
    • Line 16: warning: exported method Logger.RecordWithContext should have comment or be unexported (golint)
    • Line 46: warning: exported method Logger.WithTracer 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!


misspell91%

Misspell Finds commonly misspelled English words