Preparing report...

Report for github.com/envoyproxy/go-control-plane

(v0.10.1)

A+    Excellent!    Found 18 issues across 48 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!


gocyclo87%

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.

    • pkg/cache/v3/simple_test.go
    • Line 100: warning: cyclomatic complexity 19 of function TestSnapshotCacheWithTTL() is high (> 15) (gocyclo)
    • Line 279: warning: cyclomatic complexity 16 of function TestSnapshotCacheWatch() is high (> 15) (gocyclo)

golint70%

Golint is a linter for Go source code.

    • pkg/server/stream/v3/stream.go
    • Line 9: warning: comment on exported type Stream should be of the form "Stream ..." (with optional leading article) (golint)
    • Line 17: warning: exported type DeltaStream should have comment or be unexported (golint)
    • Line 40: warning: exported method StreamState.GetResourceVersions should have comment or be unexported (golint)
    • Line 44: warning: exported method StreamState.SetResourceVersions should have comment or be unexported (golint)
    • Line 49: warning: exported method StreamState.IsFirst should have comment or be unexported (golint)
    • Line 53: warning: exported method StreamState.IsWildcard should have comment or be unexported (golint)
    • Line 57: warning: exported method StreamState.SetKnownResourceNames should have comment or be unexported (golint)
    • Line 61: warning: exported method StreamState.SetKnownResourceNamesAsList should have comment or be unexported (golint)
    • Line 69: warning: exported method StreamState.GetKnownResourceNames should have comment or be unexported (golint)
    • pkg/test/resource/v3/resource.go
    • Line 64: warning: comment on exported const DeltaAds should be of the form "DeltaAds ..." (golint)
    • Line 268: warning: exported function MakeRouteHTTPListener should have comment or be unexported (golint)
    • Line 301: warning: comment on exported function MakeScopedRouteHTTPListener should be of the form "MakeScopedRouteHTTPListener ..." (golint)
    • Line 354: warning: comment on exported function MakeTCPListener should be of the form "MakeTCPListener ..." (golint)
    • pkg/test/v3/callbacks.go
    • Line 11: warning: exported type Callbacks should have comment or be unexported (golint)
    • Line 21: warning: exported method Callbacks.Report should have comment or be unexported (golint)
    • Line 26: warning: exported method Callbacks.OnStreamOpen should have comment or be unexported (golint)
    • Line 32: warning: exported method Callbacks.OnStreamClosed should have comment or be unexported (golint)
    • Line 37: warning: exported method Callbacks.OnDeltaStreamOpen should have comment or be unexported (golint)
    • Line 43: warning: exported method Callbacks.OnDeltaStreamClosed should have comment or be unexported (golint)
    • Line 48: warning: exported method Callbacks.OnStreamRequest should have comment or be unexported (golint)
    • Line 58: warning: exported method Callbacks.OnStreamResponse should have comment or be unexported (golint)
    • Line 60: warning: exported method Callbacks.OnStreamDeltaResponse should have comment or be unexported (golint)
    • Line 65: warning: exported method Callbacks.OnStreamDeltaRequest should have comment or be unexported (golint)
    • Line 76: warning: exported method Callbacks.OnFetchRequest should have comment or be unexported (golint)
    • Line 86: warning: exported method Callbacks.OnFetchResponse should have comment or be unexported (golint)
    • internal/example/logger.go
    • Line 1: warning: package comment should be of the form "Package example ..." (golint)
    • Line 20: warning: comment on exported type Logger should be of the form "Logger ..." (with optional leading article) (golint)
    • Line 27: warning: comment on exported method Logger.Debugf should be of the form "Debugf ..." (golint)
    • Line 34: warning: comment on exported method Logger.Infof should be of the form "Infof ..." (golint)
    • Line 41: warning: comment on exported method Logger.Warnf should be of the form "Warnf ..." (golint)
    • Line 46: warning: comment on exported method Logger.Errorf should be of the form "Errorf ..." (golint)
    • internal/example/resource.go
    • Line 1: warning: package comment should be of the form "Package example ..." (golint)
    • Line 35: warning: exported const ClusterName should have comment (or a comment on this block) or be unexported (golint)
    • Line 168: warning: exported function GenerateSnapshot should have comment or be unexported (golint)
    • pkg/cache/v3/linear.go
    • Line 70: warning: comment on exported type LinearCacheOption should be of the form "LinearCacheOption ..." (with optional leading article) (golint)
    • Line 92: warning: exported function WithLogger should have comment or be unexported (golint)
    • Line 266: warning: exported method LinearCache.CreateWatch should have comment or be unexported (golint)
    • Line 339: warning: exported method LinearCache.CreateDeltaWatch should have comment or be unexported (golint)
    • Line 405: warning: exported method LinearCache.Fetch should have comment or be unexported (golint)
    • Line 409: warning: comment on exported method LinearCache.NumWatches should be of the form "NumWatches ..." (golint)
    • Line 416: warning: comment on exported method LinearCache.NumDeltaWatches should be of the form "NumDeltaWatches ..." (golint)
    • pkg/server/rest/v3/server.go
    • Line 26: warning: exported type Server should have comment or be unexported (golint)
    • Line 30: warning: exported type Callbacks should have comment or be unexported (golint)
    • Line 38: warning: exported function NewServer should have comment or be unexported (golint)
    • pkg/cache/v3/cache.go
    • Line 276: warning: exported method RawResponse.GetContext should have comment or be unexported (golint)
    • Line 295: warning: comment on exported method RawDeltaResponse.GetNextVersionMap should be of the form "GetNextVersionMap ..." (golint)
    • Line 300: warning: exported method RawDeltaResponse.GetContext should have comment or be unexported (golint)
    • Line 355: warning: exported method PassthroughResponse.GetContext should have comment or be unexported (golint)
    • Line 367: warning: comment on exported method DeltaPassthroughResponse.GetNextVersionMap should be of the form "GetNextVersionMap ..." (golint)
    • Line 372: warning: exported method DeltaPassthroughResponse.GetContext should have comment or be unexported (golint)
    • pkg/server/sotw/v3/server.go
    • Line 35: warning: exported type Server should have comment or be unexported (golint)
    • Line 39: warning: exported type Callbacks should have comment or be unexported (golint)
    • Line 66: warning: comment on exported type Stream should be of the form "Stream ..." (with optional leading article) (golint)
    • pkg/cache/v3/mux.go
    • Line 40: warning: exported method MuxCache.CreateWatch should have comment or be unexported (golint)
    • Line 50: warning: exported method MuxCache.CreateDeltaWatch should have comment or be unexported (golint)
    • Line 60: warning: exported method MuxCache.Fetch 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!