Preparing report...

Report for github.com/famarks/loki

(v0.0.0-20240117063419-8b858da617a2)

A+    Excellent!    Found 40 issues across 356 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!


gofmt96%

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 201: warning: cyclomatic complexity 18 of function TestFileRolls() is high (> 15) (gocyclo)
    • Line 299: warning: cyclomatic complexity 18 of function TestResumesWhereLeftOff() 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/logcli/query/query.go
    • Line 261: warning: cyclomatic complexity 21 of function (*Query).printStream() is high (> 15) (gocyclo)
    • Line 60: warning: cyclomatic complexity 16 of function (*Query).DoQuery() 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)
    • 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/logproto/types.go
    • Line 91: warning: cyclomatic complexity 32 of function (*Stream).Unmarshal() is high (> 15) (gocyclo)
    • Line 211: warning: cyclomatic complexity 32 of function (*Entry).Unmarshal() is high (> 15) (gocyclo)
    • pkg/logql/evaluator.go
    • Line 577: warning: cyclomatic complexity 64 of function mergeBinOp() is high (> 15) (gocyclo)
    • Line 214: warning: cyclomatic complexity 47 of function vectorAggEvaluator() is high (> 15) (gocyclo)
    • Line 465: warning: cyclomatic complexity 18 of function binOpStepEvaluator() 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!