Preparing report...

Report for github.com/grafana/loki

(v1.6.1)

A+    Excellent!    Found 45 issues across 321 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!


gofmt92%

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!


gocyclo92%

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/promtail/targets/file/filetarget_test.go
    • Line 509: warning: cyclomatic complexity 27 of function TestFileTargetSync() is high (> 15) (gocyclo)
    • Line 299: warning: cyclomatic complexity 18 of function TestResumesWhereLeftOff() is high (> 15) (gocyclo)
    • Line 201: warning: cyclomatic complexity 18 of function TestFileRolls() is high (> 15) (gocyclo)
    • Line 407: warning: cyclomatic complexity 18 of function TestGlobWithMultipleFiles() is high (> 15) (gocyclo)
    • Line 108: warning: cyclomatic complexity 16 of function TestWatchEntireDirectory() is high (> 15) (gocyclo)
    • pkg/logentry/stages/drop.go
    • Line 103: warning: cyclomatic complexity 33 of function (*dropStage).Process() is high (> 15) (gocyclo)
    • Line 44: warning: cyclomatic complexity 16 of function validateDropConfig() is high (> 15) (gocyclo)
    • pkg/logql/test_utils.go
    • Line 31: warning: cyclomatic complexity 19 of function (MockQuerier).SelectLogs() is high (> 15) (gocyclo)
    • Line 113: warning: cyclomatic complexity 18 of function (MockQuerier).SelectSamples() is high (> 15) (gocyclo)
    • pkg/logql/evaluator.go
    • Line 529: warning: cyclomatic complexity 64 of function mergeBinOp() is high (> 15) (gocyclo)
    • Line 180: warning: cyclomatic complexity 47 of function vectorAggEvaluator() is high (> 15) (gocyclo)
    • Line 417: warning: cyclomatic complexity 18 of function binOpStepEvaluator() is high (> 15) (gocyclo)
    • cmd/docker-driver/config.go
    • Line 135: warning: cyclomatic complexity 40 of function parseConfig() is high (> 15) (gocyclo)
    • Line 91: warning: cyclomatic complexity 30 of function validateDriverOpt() is high (> 15) (gocyclo)
    • pkg/logcli/query/query.go
    • Line 256: warning: cyclomatic complexity 22 of function (*Query).printStream() is high (> 15) (gocyclo)
    • Line 60: warning: cyclomatic complexity 17 of function (*Query).DoQuery() is high (> 15) (gocyclo)
    • pkg/logproto/types.go
    • Line 211: warning: cyclomatic complexity 32 of function (*Entry).Unmarshal() is high (> 15) (gocyclo)
    • Line 91: warning: cyclomatic complexity 32 of function (*Stream).Unmarshal() 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!