Preparing report...

Report for github.com/loghole/tracing

(v0.15.0)

A    Great!    Found 16 issues across 19 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!


gocyclo94%

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.


golint15%

Golint is a linter for Go source code.

    • test/zap.go
    • Line 11: warning: exported type MockLogger should have comment or be unexported (golint)
    • Line 16: warning: exported function NewMockLogger should have comment or be unexported (golint)
    • Line 42: warning: exported function NoopTimeEncoder should have comment or be unexported (golint)
    • tracehttp/transport.go
    • Line 13: warning: exported type Transport should have comment or be unexported (golint)
    • Line 19: warning: exported function NewTransport should have comment or be unexported (golint)
    • span_context.go
    • Line 11: warning: exported function SpanFromContext should have comment or be unexported (golint)
    • Line 15: warning: exported function InjectMap should have comment or be unexported (golint)
    • Line 19: warning: exported function InjectHeaders should have comment or be unexported (golint)
    • tracer.go
    • Line 23: warning: exported type Tracer should have comment or be unexported (golint)
    • Line 30: warning: exported function NewTracer should have comment or be unexported (golint)
    • Line 79: warning: exported method Tracer.Close should have comment or be unexported (golint)
    • Line 92: warning: exported method Tracer.NewSpan should have comment or be unexported (golint)
    • Line 96: warning: exported type SpanBuilder should have comment or be unexported (golint)
    • Line 103: warning: exported method SpanBuilder.WithName should have comment or be unexported (golint)
    • Line 109: warning: exported method SpanBuilder.ExtractMap should have comment or be unexported (golint)
    • Line 119: warning: exported method SpanBuilder.ExtractHeaders should have comment or be unexported (golint)
    • Line 129: warning: exported method SpanBuilder.Start should have comment or be unexported (golint)
    • Line 135: warning: exported method SpanBuilder.StartWithContext should have comment or be unexported (golint)
    • internal/logtracer/log_tracer.go
    • Line 15: warning: exported type LogTraceProvider should have comment or be unexported (golint)
    • Line 17: warning: exported function NewProvider should have comment or be unexported (golint)
    • Line 21: warning: exported method LogTraceProvider.Tracer should have comment or be unexported (golint)
    • Line 46: warning: exported type LogTracer should have comment or be unexported (golint)
    • Line 50: warning: exported method LogTracer.Start should have comment or be unexported (golint)
    • Line 79: warning: exported type LogSpan should have comment or be unexported (golint)
    • Line 85: warning: exported method LogSpan.End should have comment or be unexported (golint)
    • Line 86: warning: exported method LogSpan.AddEvent should have comment or be unexported (golint)
    • Line 87: warning: exported method LogSpan.IsRecording should have comment or be unexported (golint)
    • Line 88: warning: exported method LogSpan.RecordError should have comment or be unexported (golint)
    • Line 89: warning: exported method LogSpan.SetStatus should have comment or be unexported (golint)
    • Line 90: warning: exported method LogSpan.SetName should have comment or be unexported (golint)
    • Line 91: warning: exported method LogSpan.SetAttributes should have comment or be unexported (golint)
    • Line 92: warning: exported method LogSpan.TracerProvider should have comment or be unexported (golint)
    • Line 94: warning: exported method LogSpan.SpanContext should have comment or be unexported (golint)
    • tracelog/tracelog.go
    • Line 20: warning: exported type Logger should have comment or be unexported (golint)
    • Line 34: warning: exported type TraceLogger should have comment or be unexported (golint)
    • Line 38: warning: exported function NewTraceLogger should have comment or be unexported (golint)
    • Line 44: warning: exported method TraceLogger.Debug should have comment or be unexported (golint)
    • Line 48: warning: exported method TraceLogger.Debugf should have comment or be unexported (golint)
    • Line 52: warning: exported method TraceLogger.Info should have comment or be unexported (golint)
    • Line 56: warning: exported method TraceLogger.Infof should have comment or be unexported (golint)
    • Line 60: warning: exported method TraceLogger.Warn should have comment or be unexported (golint)
    • Line 64: warning: exported method TraceLogger.Warnf should have comment or be unexported (golint)
    • Line 73: warning: exported method TraceLogger.Errorf should have comment or be unexported (golint)
    • Line 78: warning: exported method TraceLogger.With should have comment or be unexported (golint)
    • Line 84: warning: exported method TraceLogger.WithJSON should have comment or be unexported (golint)
    • Line 94: warning: exported method TraceLogger.TraceID should have comment or be unexported (golint)
    • Line 109: warning: exported function TraceID should have comment or be unexported (golint)
    • tracehttp/server.go
    • Line 14: warning: exported const ComponentName should have comment or be unexported (golint)
    • Line 16: warning: exported type Option should have comment or be unexported (golint)
    • Line 18: warning: exported function WithNameFunc should have comment or be unexported (golint)
    • Line 24: warning: exported function WithFilterFunc should have comment or be unexported (golint)
    • Line 30: warning: exported type Options should have comment or be unexported (golint)
    • Line 35: warning: exported type Middleware should have comment or be unexported (golint)
    • Line 40: warning: exported function NewMiddleware should have comment or be unexported (golint)
    • Line 58: warning: exported function Handler should have comment or be unexported (golint)
    • Line 64: warning: exported method Middleware.Middleware should have comment or be unexported (golint)
    • internal/spanprocessor/spanprocessor.go
    • Line 12: warning: exported type Sampled should have comment or be unexported (golint)
    • Line 20: warning: exported function NewSampled should have comment or be unexported (golint)
    • Line 33: warning: exported method Sampled.OnStart should have comment or be unexported (golint)
    • Line 38: warning: exported method Sampled.OnEnd should have comment or be unexported (golint)
    • Line 69: warning: exported method Sampled.Shutdown should have comment or be unexported (golint)
    • Line 75: warning: exported method Sampled.ForceFlush should have comment or be unexported (golint)
    • tracegrpc/client.go
    • Line 19: warning: exported function Dial should have comment or be unexported (golint)
    • Line 23: warning: exported function DialContext should have comment or be unexported (golint)
    • Line 40: warning: exported function UnaryClientInterceptor should have comment or be unexported (golint)
    • Line 78: warning: exported function StreamClientInterceptor should have comment or be unexported (golint)
    • configuration.go
    • Line 14: warning: exported var ErrInvalidConfiguration should have comment or be unexported (golint)
    • Line 16: warning: exported type Configuration should have comment or be unexported (golint)
    • Line 26: warning: exported function DefaultConfiguration should have comment or be unexported (golint)
    • prometheus.go
    • Line 7: warning: exported function EnablePrometheusMetrics should have comment or be unexported (golint)
    • span.go
    • Line 18: warning: exported type Span should have comment or be unexported (golint)
    • Line 23: warning: exported function ChildSpan should have comment or be unexported (golint)
    • Line 132: warning: exported method Span.SetTag should have comment or be unexported (golint)
    • tracehttp/client.go
    • Line 14: warning: exported type Client should have comment or be unexported (golint)
    • Line 19: warning: exported function NewClient should have comment or be unexported (golint)
    • Line 25: warning: exported method Client.Do should have comment or be unexported (golint)
    • Line 36: warning: exported method Client.Get should have comment or be unexported (golint)
    • Line 45: warning: exported method Client.Post should have comment or be unexported (golint)
    • Line 56: warning: exported method Client.PostForm should have comment or be unexported (golint)
    • tracehttp/status-code-tracker.go
    • Line 8: warning: exported type StatusCodeTracker should have comment or be unexported (golint)
    • Line 13: warning: exported function NewStatusCodeTracker should have comment or be unexported (golint)
    • Line 20: warning: exported method StatusCodeTracker.OpentracingCode should have comment or be unexported (golint)
    • Line 24: warning: exported method StatusCodeTracker.WriteHeader 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!