Preparing report...

Report for github.com/credativ/vali

(v0.0.0-20230117115745-8875aa4160a4)

A+    Excellent!    Found 32 issues across 417 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!


gofmt100%

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

No problems detected. Good job!


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/logcli/query/query.go
    • Line 258: warning: cyclomatic complexity 24 of function (*Query).printStream() is high (> 15) (gocyclo)
    • Line 60: warning: cyclomatic complexity 16 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)
    • pkg/valitail/targets/file/filetarget_test.go
    • Line 505: warning: cyclomatic complexity 27 of function TestFileTargetSync() is high (> 15) (gocyclo)
    • Line 297: warning: cyclomatic complexity 18 of function TestResumesWhereLeftOff() is high (> 15) (gocyclo)
    • Line 200: warning: cyclomatic complexity 18 of function TestFileRolls() is high (> 15) (gocyclo)
    • Line 404: 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/logql/evaluator.go
    • Line 622: warning: cyclomatic complexity 64 of function mergeBinOp() is high (> 15) (gocyclo)
    • Line 213: warning: cyclomatic complexity 47 of function vectorAggEvaluator() is high (> 15) (gocyclo)
    • Line 511: warning: cyclomatic complexity 18 of function binOpStepEvaluator() is high (> 15) (gocyclo)
    • pkg/logentry/stages/drop.go
    • Line 119: warning: cyclomatic complexity 31 of function (*dropStage).shouldDrop() is high (> 15) (gocyclo)
    • Line 44: warning: cyclomatic complexity 16 of function validateDropConfig() is high (> 15) (gocyclo)
    • cmd/migrate/main.go
    • Line 38: warning: cyclomatic complexity 25 of function main() is high (> 15) (gocyclo)
    • Line 290: warning: cyclomatic complexity 19 of function (*chunkMover).moveChunks() 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)

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!