Preparing report...

Report for github.com/tricksterproxy/trickster

A+    Excellent!    Found 96 issues across 566 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!


gocyclo90%

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.

    • trickster/pkg/timeseries/dataset/dataset.go
    • Line 216: warning: cyclomatic complexity 26 of function (*DataSet).DefaultMerger() is high (> 15) (gocyclo)
    • Line 72: warning: cyclomatic complexity 18 of function (*DataSet).CroppedClone() is high (> 15) (gocyclo)
    • Line 365: warning: cyclomatic complexity 16 of function (*DataSet).DefaultRangeCropper() is high (> 15) (gocyclo)
    • trickster/pkg/proxy/engines/document_gen.go
    • Line 27: warning: cyclomatic complexity 45 of function (*HTTPDocument).DecodeMsg() is high (> 15) (gocyclo)
    • Line 401: warning: cyclomatic complexity 45 of function (*HTTPDocument).UnmarshalMsg() is high (> 15) (gocyclo)
    • Line 195: warning: cyclomatic complexity 31 of function (*HTTPDocument).EncodeMsg() is high (> 15) (gocyclo)
    • trickster/pkg/backends/clickhouse/parsing.go
    • Line 496: warning: cyclomatic complexity 54 of function parseWhereTokens() is high (> 15) (gocyclo)
    • Line 268: warning: cyclomatic complexity 52 of function parseSelectTokens() is high (> 15) (gocyclo)
    • Line 448: warning: cyclomatic complexity 17 of function SolveMathExpression() is high (> 15) (gocyclo)
    • trickster/pkg/timeseries/dataset/dataset_gen.go
    • Line 329: warning: cyclomatic complexity 34 of function (*DataSet).UnmarshalMsg() is high (> 15) (gocyclo)
    • Line 27: warning: cyclomatic complexity 34 of function (*DataSet).DecodeMsg() is high (> 15) (gocyclo)
    • Line 154: warning: cyclomatic complexity 25 of function (*DataSet).EncodeMsg() is high (> 15) (gocyclo)
    • trickster/pkg/proxy/engines/caching_policy_gen.go
    • Line 296: warning: cyclomatic complexity 30 of function (*CachingPolicy).UnmarshalMsg() is high (> 15) (gocyclo)
    • Line 26: warning: cyclomatic complexity 30 of function (*CachingPolicy).DecodeMsg() is high (> 15) (gocyclo)
    • Line 127: warning: cyclomatic complexity 25 of function (*CachingPolicy).EncodeMsg() is high (> 15) (gocyclo)
    • trickster/pkg/proxy/engines/deltaproxycache_test.go
    • Line 363: warning: cyclomatic complexity 21 of function TestDeltaProxyCacheRequestPartialHit() is high (> 15) (gocyclo)
    • Line 793: warning: cyclomatic complexity 18 of function TestDeltaProxyCacheRequestFastForward() is high (> 15) (gocyclo)
    • Line 648: warning: cyclomatic complexity 17 of function TestDeltaProxyCacheRequestRangeMiss() is high (> 15) (gocyclo)
    • trickster/pkg/timeseries/timerangequery_gen.go
    • Line 26: warning: cyclomatic complexity 28 of function (*TimeRangeQuery).DecodeMsg() is high (> 15) (gocyclo)
    • Line 282: warning: cyclomatic complexity 28 of function (*TimeRangeQuery).UnmarshalMsg() is high (> 15) (gocyclo)
    • Line 129: warning: cyclomatic complexity 21 of function (*TimeRangeQuery).EncodeMsg() is high (> 15) (gocyclo)
    • trickster/pkg/backends/clickhouse/model/model.go
    • Line 442: warning: cyclomatic complexity 34 of function UnmarshalTimeseriesReader() is high (> 15) (gocyclo)
    • Line 261: warning: cyclomatic complexity 32 of function marshalTimeseriesXSV() is high (> 15) (gocyclo)
    • Line 90: warning: cyclomatic complexity 23 of function marshalTimeseriesJSON() is high (> 15) (gocyclo)
    • trickster/pkg/cache/index/index_gen.go
    • Line 26: warning: cyclomatic complexity 21 of function (*Index).DecodeMsg() is high (> 15) (gocyclo)
    • Line 192: warning: cyclomatic complexity 21 of function (*Index).UnmarshalMsg() is high (> 15) (gocyclo)
    • Line 477: warning: cyclomatic complexity 18 of function (*Object).UnmarshalMsg() is high (> 15) (gocyclo)
    • Line 292: warning: cyclomatic complexity 18 of function (*Object).DecodeMsg() is high (> 15) (gocyclo)
    • Line 357: warning: cyclomatic complexity 17 of function (*Object).EncodeMsg() is high (> 15) (gocyclo)

golint93%

Golint is a linter for Go source code.

    • trickster/pkg/encoding/profile/context.go
    • Line 21: warning: exported type ContextType should have comment or be unexported (golint)
    • Line 23: warning: exported const ContextKey should have comment or be unexported (golint)
    • Line 25: warning: exported function FromContext should have comment or be unexported (golint)
    • Line 37: warning: exported function ToContext should have comment or be unexported (golint)
    • trickster/pkg/encoding/profile/profile.go
    • Line 29: warning: exported type Profile should have comment or be unexported (golint)
    • Line 52: warning: exported method Profile.Clone should have comment or be unexported (golint)
    • Line 101: warning: exported method Profile.ClientAcceptsEncoding should have comment or be unexported (golint)
    • trickster/pkg/encoding/providers/providers.go
    • Line 28: warning: exported const Zstandard should have comment (or a comment on this block) or be unexported (golint)
    • Line 33: warning: comment on exported const Snappy should be of the form "Snappy ..." (golint)
    • Line 41: warning: comment on exported const ZstandardValue should be of the form "ZstandardValue ..." (golint)
    • Line 47: warning: comment on exported const ZstandardAltValue should be of the form "ZstandardAltValue ..." (golint)
    • Line 52: warning: exported type Provider should have comment or be unexported (golint)
    • Line 53: warning: exported type Lookup should have comment or be unexported (golint)
    • Line 54: warning: exported type ReverseLookup should have comment or be unexported (golint)
    • Line 78: warning: exported var AllSupportedWebProviders should have comment or be unexported (golint)
    • Line 79: warning: exported var AllSupportedWwebProvidersBitmap should have comment or be unexported (golint)
    • trickster/pkg/observability/logging/logging.go
    • Line 53: warning: exported function Debug should have comment or be unexported (golint)
    • Line 70: warning: exported function Info should have comment or be unexported (golint)
    • Line 87: warning: exported function Warn should have comment or be unexported (golint)
    • Line 104: warning: exported function WarnOnce should have comment or be unexported (golint)
    • Line 121: warning: exported function Error should have comment or be unexported (golint)
    • Line 158: warning: exported method Pairs.ToList should have comment or be unexported (golint)
    • Line 194: warning: exported function StreamLogger should have comment or be unexported (golint)
    • trickster/pkg/encoding/providers/getters.go
    • Line 30: warning: exported type EncoderInitializer should have comment or be unexported (golint)
    • Line 31: warning: exported type DecoderInitializer should have comment or be unexported (golint)
    • Line 74: warning: comment on exported function SelectDecoderInitializer should be of the form "SelectDecoderInitializer ..." (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign97%

IneffAssign detects ineffectual assignments in Go code.


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!