Preparing report...

Report for github.com/dgraph-io/badger

(v1.6.2)

A+    Excellent!    Found 21 issues across 79 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!


gofmt89%

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


gocyclo84%

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.

    • manifest.go
    • Line 334: warning: cyclomatic complexity 16 of function ReplayManifestFile() is high (> 15) (gocyclo)
    • backup_test.go
    • Line 118: warning: cyclomatic complexity 16 of function TestBackupRestore2() is high (> 15) (gocyclo)
    • levels.go
    • Line 465: warning: cyclomatic complexity 34 of function (*levelsController).compactBuildTables() is high (> 15) (gocyclo)
    • Line 79: warning: cyclomatic complexity 17 of function newLevelsController() is high (> 15) (gocyclo)
    • db.go
    • Line 193: warning: cyclomatic complexity 28 of function Open() is high (> 15) (gocyclo)
    • Line 368: warning: cyclomatic complexity 17 of function (*DB).close() is high (> 15) (gocyclo)
    • y/watermark.go
    • Line 144: warning: cyclomatic complexity 23 of function (*WaterMark).process() is high (> 15) (gocyclo)
    • db_test.go
    • Line 466: warning: cyclomatic complexity 20 of function TestGetMore() is high (> 15) (gocyclo)
    • stream.go
    • Line 149: warning: cyclomatic complexity 24 of function (*Stream).produceKVs() is high (> 15) (gocyclo)
    • value.go
    • Line 348: warning: cyclomatic complexity 23 of function (*valueLog).rewrite() is high (> 15) (gocyclo)
    • Line 259: warning: cyclomatic complexity 21 of function (*valueLog).iterate() is high (> 15) (gocyclo)
    • Line 1368: warning: cyclomatic complexity 19 of function (*valueLog).doRunGC() is high (> 15) (gocyclo)
    • Line 848: warning: cyclomatic complexity 19 of function (*valueLog).open() is high (> 15) (gocyclo)
    • Line 1108: warning: cyclomatic complexity 17 of function (*valueLog).write() is high (> 15) (gocyclo)
    • stream_writer.go
    • Line 84: warning: cyclomatic complexity 18 of function (*StreamWriter).Write() is high (> 15) (gocyclo)
    • Line 187: warning: cyclomatic complexity 16 of function (*StreamWriter).Flush() is high (> 15) (gocyclo)

ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


misspell96%

Misspell Finds commonly misspelled English words