Preparing report...

Report for github.com/modern-go/countlog

A+    Excellent!    Found 19 issues across 43 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!


golint55%

Golint is a linter for Go source code.

    • countlog/stats/async.go
    • Line 7: warning: exported type Executor should have comment or be unexported (golint)
    • Line 9: warning: exported function DefaultExecutor should have comment or be unexported (golint)
    • countlog/countlog.go
    • Line 10: warning: exported const LevelTraceCall should have comment or be unexported (golint)
    • Line 11: warning: exported const LevelTrace should have comment or be unexported (golint)
    • Line 12: warning: exported const LevelDebugCall should have comment or be unexported (golint)
    • Line 13: warning: exported const LevelDebug should have comment or be unexported (golint)
    • Line 14: warning: exported const LevelInfoCall should have comment or be unexported (golint)
    • Line 15: warning: exported const LevelInfo should have comment or be unexported (golint)
    • Line 16: warning: exported const LevelWarn should have comment or be unexported (golint)
    • Line 17: warning: exported const LevelError should have comment or be unexported (golint)
    • Line 18: warning: exported const LevelFatal should have comment or be unexported (golint)
    • Line 20: warning: exported function SetMinLevel should have comment or be unexported (golint)
    • Line 25: warning: exported function ShouldLog should have comment or be unexported (golint)
    • Line 29: warning: exported function Trace should have comment or be unexported (golint)
    • Line 52: warning: exported function Debug should have comment or be unexported (golint)
    • Line 75: warning: exported function Info should have comment or be unexported (golint)
    • Line 98: warning: exported function Warn should have comment or be unexported (golint)
    • Line 103: warning: exported function Error should have comment or be unexported (golint)
    • Line 108: warning: exported function Fatal should have comment or be unexported (golint)
    • Line 113: warning: exported function Log should have comment or be unexported (golint)
    • Line 121: warning: exported function LogPanic should have comment or be unexported (golint)
    • countlog/handler.go
    • Line 15: warning: context.Context should be the first parameter of a function (golint)
    • Line 35: warning: context.Context should be the first parameter of a function (golint)
    • Line 43: warning: context.Context should be the first parameter of a function (golint)
    • countlog/format/hrf/hrf.go
    • Line 9: warning: exported type Format should have comment or be unexported (golint)
    • Line 18: warning: exported method Format.FormatterOf should have comment or be unexported (golint)
    • countlog/stats/state.go
    • Line 8: warning: exported type Point should have comment or be unexported (golint)
    • Line 15: warning: exported type Collector should have comment or be unexported (golint)
    • Line 19: warning: exported type Monoid should have comment or be unexported (golint)
    • Line 24: warning: exported type State should have comment or be unexported (golint)
    • Line 29: warning: exported type CounterMonoid should have comment or be unexported (golint)
    • Line 31: warning: exported function NewCounterMonoid should have comment or be unexported (golint)
    • Line 36: warning: exported method CounterMonoid.Add should have comment or be unexported (golint)
    • Line 40: warning: exported method CounterMonoid.Export should have comment or be unexported (golint)
    • Line 46: warning: exported type MapMonoid should have comment or be unexported (golint)
    • Line 48: warning: exported method MapMonoid.Add should have comment or be unexported (golint)
    • countlog/context.go
    • Line 10: warning: exported function Ctx should have comment or be unexported (golint)
    • Line 18: warning: exported type Context should have comment or be unexported (golint)
    • Line 23: warning: exported method Context.Value should have comment or be unexported (golint)
    • Line 33: warning: exported method Context.Trace should have comment or be unexported (golint)
    • Line 41: warning: exported method Context.TraceCall should have comment or be unexported (golint)
    • Line 54: warning: exported method Context.Debug should have comment or be unexported (golint)
    • Line 62: warning: exported method Context.DebugCall should have comment or be unexported (golint)
    • Line 75: warning: exported method Context.Info should have comment or be unexported (golint)
    • Line 83: warning: exported method Context.InfoCall should have comment or be unexported (golint)
    • Line 96: warning: exported method Context.LogAccess should have comment or be unexported (golint)
    • Line 109: warning: exported method Context.Warn should have comment or be unexported (golint)
    • Line 119: warning: exported method Context.Fatal should have comment or be unexported (golint)
    • Line 124: warning: exported method Context.Add should have comment or be unexported (golint)
    • countlog/stats/window.go
    • Line 14: warning: exported type Window should have comment or be unexported (golint)
    • Line 53: warning: exported method Window.Mutate should have comment or be unexported (golint)
    • Line 59: warning: exported method Window.Export should have comment or be unexported (golint)
    • countlog/spi.go
    • Line 11: warning: exported var EventWriter should have comment or be unexported (golint)
    • Line 16: warning: exported var EventAggregator should have comment or be unexported (golint)
    • countlog/format/format.go
    • Line 5: warning: exported type Format should have comment or be unexported (golint)
    • Line 9: warning: exported type Formatter should have comment or be unexported (golint)
    • Line 13: warning: exported type Formatters should have comment or be unexported (golint)
    • Line 15: warning: exported method Formatters.Format should have comment or be unexported (golint)
    • Line 22: warning: exported type FuncFormatter should have comment or be unexported (golint)
    • Line 24: warning: exported method FuncFormatter.Format should have comment or be unexported (golint)
    • countlog/logger/context.go
    • Line 5: warning: exported var LogContextKey should have comment or be unexported (golint)
    • Line 7: warning: exported type LogContext should have comment or be unexported (golint)
    • Line 12: warning: exported method LogContext.Add should have comment or be unexported (golint)
    • Line 20: warning: exported function GetLogContext should have comment or be unexported (golint)
    • Line 28: warning: exported function WithLogContext should have comment or be unexported (golint)
    • Line 29: warning: should not use basic type int as key in context.WithValue (golint)
    • countlog/logger/logger.go
    • Line 23: warning: exported const LevelDebugCall should have comment or be unexported (golint)
    • Line 24: warning: exported const LevelDebug should have comment or be unexported (golint)
    • Line 25: warning: exported const LevelInfoCall should have comment or be unexported (golint)
    • Line 39: warning: exported function LevelName should have comment or be unexported (golint)
    • Line 69: warning: exported method LogSite.LogContext should have comment or be unexported (golint)
    • Line 77: warning: exported method LogSite.Location should have comment or be unexported (golint)
    • Line 81: warning: exported type Event should have comment or be unexported (golint)
    • Line 89: warning: exported type EventSink should have comment or be unexported (golint)
    • Line 93: warning: exported type EventHandler should have comment or be unexported (golint)
    • Line 98: warning: exported type EventHandlers should have comment or be unexported (golint)
    • Line 100: warning: exported method EventHandlers.Handle should have comment or be unexported (golint)
    • Line 106: warning: exported method EventHandlers.LogSite should have comment or be unexported (golint)
    • Line 110: warning: exported type DummyEventHandler should have comment or be unexported (golint)
    • Line 114: warning: exported method DummyEventHandler.Handle should have comment or be unexported (golint)
    • Line 117: warning: exported method DummyEventHandler.LogSite should have comment or be unexported (golint)
    • Line 121: warning: exported type Memo should have comment or be unexported (golint)
    • Line 126: warning: exported type FuncEventSink should have comment or be unexported (golint)
    • Line 128: warning: exported method FuncEventSink.HandlerOf should have comment or be unexported (golint)
    • Line 132: warning: exported type FuncEventHandler should have comment or be unexported (golint)
    • Line 134: warning: exported method FuncEventHandler.Handle should have comment or be unexported (golint)
    • Line 138: warning: exported method FuncEventHandler.LogSite should have comment or be unexported (golint)
    • countlog/stats/stats.go
    • Line 7: warning: exported type EventAggregator should have comment or be unexported (golint)
    • Line 12: warning: exported function NewEventAggregator should have comment or be unexported (golint)
    • Line 20: warning: exported method EventAggregator.HandlerOf should have comment or be unexported (golint)
    • countlog/output/writer.go
    • Line 11: warning: exported type EventWriter should have comment or be unexported (golint)
    • Line 16: warning: exported function NewEventWriter should have comment or be unexported (golint)
    • Line 25: warning: exported method EventWriter.HandlerOf should have comment or be unexported (golint)
    • countlog/rotation/bytime/rotation.go
    • Line 21: warning: exported type Writer should have comment or be unexported (golint)
    • Line 36: warning: exported function NewRotationWriter should have comment or be unexported (golint)
    • Line 69: warning: exported method Writer.Close 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!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!