Preparing report...

Report for github.com/grafana/metrictank

(v1.0.0)

A+    Excellent!    Found 66 issues across 506 files

Tweet

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!


gofmt99%

Gofmt formats Go programs. We run gofmt -s on your code, where -s is for the "simplify" command


ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

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.

    • api/models/storagestats_gen.go
    • Line 166: warning: cyclomatic complexity 17 of function (*StorageStats).UnmarshalMsg() is high (> 15) (gocyclo)
    • Line 10: warning: cyclomatic complexity 17 of function (*StorageStats).DecodeMsg() is high (> 15) (gocyclo)
    • api/cluster.go
    • Line 526: warning: cyclomatic complexity 20 of function queryPeers() is high (> 15) (gocyclo)
    • idx/memory/meta_tags_query_test.go
    • Line 239: warning: cyclomatic complexity 19 of function TestMetaTagEnrichmentForQueryByMetaTag() is high (> 15) (gocyclo)
    • Line 386: warning: cyclomatic complexity 16 of function BenchmarkMetaTagEnricher() is high (> 15) (gocyclo)
    • Line 316: warning: cyclomatic complexity 16 of function TestMetaTagRecordSwap() is high (> 15) (gocyclo)
    • conf/schemas.go
    • Line 89: warning: cyclomatic complexity 16 of function ReadSchemas() is high (> 15) (gocyclo)
    • publish/kafka/publish.go
    • Line 252: warning: cyclomatic complexity 30 of function (*mtPublisher).Publish() is high (> 15) (gocyclo)
    • Line 161: warning: cyclomatic complexity 20 of function New() is high (> 15) (gocyclo)
    • api/graphite.go
    • Line 160: warning: cyclomatic complexity 29 of function (*Server).renderMetrics() is high (> 15) (gocyclo)
    • Line 690: warning: cyclomatic complexity 26 of function (*Server).executePlan() is high (> 15) (gocyclo)
    • Line 988: warning: cyclomatic complexity 16 of function (*Server).graphiteTagFindSeries() is high (> 15) (gocyclo)
    • expr/plan.go
    • Line 231: warning: cyclomatic complexity 17 of function newplanFunc() is high (> 15) (gocyclo)
    • idx/memory/memory.go
    • Line 1635: warning: cyclomatic complexity 27 of function (*UnpartitionedMemoryIdx).Prune() is high (> 15) (gocyclo)
    • Line 1534: warning: cyclomatic complexity 17 of function (*UnpartitionedMemoryIdx).delete() is high (> 15) (gocyclo)
    • Line 989: warning: cyclomatic complexity 17 of function (*UnpartitionedMemoryIdx).FindTagsWithQuery() is high (> 15) (gocyclo)
    • Line 1098: warning: cyclomatic complexity 16 of function (*UnpartitionedMemoryIdx).FindTagValuesWithQuery() is high (> 15) (gocyclo)
    • Line 1264: warning: cyclomatic complexity 16 of function (*UnpartitionedMemoryIdx).Find() is high (> 15) (gocyclo)
    • schema/metric_gen.go
    • Line 717: warning: cyclomatic complexity 26 of function (*MetricDefinition).UnmarshalMsg() is high (> 15) (gocyclo)
    • Line 10: warning: cyclomatic complexity 26 of function (*MetricData).DecodeMsg() is high (> 15) (gocyclo)
    • Line 246: warning: cyclomatic complexity 26 of function (*MetricData).UnmarshalMsg() is high (> 15) (gocyclo)
    • Line 477: warning: cyclomatic complexity 26 of function (*MetricDefinition).DecodeMsg() is high (> 15) (gocyclo)
    • Line 573: warning: cyclomatic complexity 21 of function (*MetricDefinition).EncodeMsg() is high (> 15) (gocyclo)
    • Line 106: warning: cyclomatic complexity 21 of function (*MetricData).EncodeMsg() is high (> 15) (gocyclo)
    • expr/expr.go
    • Line 67: warning: cyclomatic complexity 72 of function (expr).consumeBasicArg() is high (> 15) (gocyclo)
    • Line 277: warning: cyclomatic complexity 27 of function (expr).consumeSeriesArg() is high (> 15) (gocyclo)
    • Line 355: warning: cyclomatic complexity 22 of function (expr).consumeKwarg() is high (> 15) (gocyclo)
    • api/models/series_gen.go
    • Line 387: warning: cyclomatic complexity 41 of function (*Series).UnmarshalMsg() is high (> 15) (gocyclo)
    • Line 11: warning: cyclomatic complexity 41 of function (*Series).DecodeMsg() is high (> 15) (gocyclo)
    • Line 162: warning: cyclomatic complexity 32 of function (*Series).EncodeMsg() is high (> 15) (gocyclo)
    • Line 1294: warning: cyclomatic complexity 21 of function (*SeriesMetaProperties).UnmarshalMsg() is high (> 15) (gocyclo)
    • Line 1092: warning: cyclomatic complexity 21 of function (*SeriesMetaProperties).DecodeMsg() is high (> 15) (gocyclo)
    • Line 646: warning: cyclomatic complexity 20 of function (*SeriesForPickle).DecodeMsg() is high (> 15) (gocyclo)
    • Line 829: warning: cyclomatic complexity 20 of function (*SeriesForPickle).UnmarshalMsg() is high (> 15) (gocyclo)
    • Line 1169: warning: cyclomatic complexity 17 of function (*SeriesMetaProperties).EncodeMsg() is high (> 15) (gocyclo)
    • api/models/cluster_gen.go
    • Line 478: warning: cyclomatic complexity 16 of function (*IndexFindResp).DecodeMsg() is high (> 15) (gocyclo)
    • Line 606: warning: cyclomatic complexity 16 of function (*IndexFindResp).UnmarshalMsg() is high (> 15) (gocyclo)
    • clock/clock_test.go
    • Line 8: warning: cyclomatic complexity 20 of function TestAlignedTickLossless() is high (> 15) (gocyclo)
    • expr/parse.go
    • Line 409: warning: cyclomatic complexity 20 of function extractMetric() is high (> 15) (gocyclo)
    • Line 218: warning: cyclomatic complexity 20 of function parseArgList() is high (> 15) (gocyclo)
    • Line 135: warning: cyclomatic complexity 17 of function Parse() is high (> 15) (gocyclo)
    • input/input.go
    • Line 116: warning: cyclomatic complexity 16 of function (DefaultHandler).ProcessMetricData() is high (> 15) (gocyclo)
    • idx/idx_gen.go
    • Line 385: warning: cyclomatic complexity 18 of function (*Node).UnmarshalMsg() is high (> 15) (gocyclo)
    • Line 217: warning: cyclomatic complexity 18 of function (*Node).DecodeMsg() is high (> 15) (gocyclo)
    • mdata/chunk/archive/archive_gen.go
    • Line 156: warning: cyclomatic complexity 16 of function (*Archive).UnmarshalMsg() is high (> 15) (gocyclo)
    • Line 11: warning: cyclomatic complexity 16 of function (*Archive).DecodeMsg() is high (> 15) (gocyclo)
    • api/models/graphite_gen.go
    • Line 717: warning: cyclomatic complexity 21 of function (*GraphiteTagTermsResp).UnmarshalMsg() is high (> 15) (gocyclo)
    • Line 557: warning: cyclomatic complexity 21 of function (*GraphiteTagTermsResp).DecodeMsg() is high (> 15) (gocyclo)
    • Line 912: warning: cyclomatic complexity 17 of function (*SeriesPickleItem).DecodeMsg() is high (> 15) (gocyclo)
    • Line 1057: warning: cyclomatic complexity 17 of function (*SeriesPickleItem).UnmarshalMsg() is high (> 15) (gocyclo)
    • api/ccache.go
    • Line 18: warning: cyclomatic complexity 17 of function (*Server).ccacheDelete() is high (> 15) (gocyclo)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!