Preparing report...

Report for github.com/boltdb/bolt

A+    Excellent!    Found 12 issues across 34 files

Tweet

gofmt94%

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


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!


gocyclo79%

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.

    • bolt/db_test.go
    • Line 783: warning: cyclomatic complexity 19 of function TestDB_Consistency() is high (> 15) (gocyclo)
    • bolt/cursor_test.go
    • Line 283: warning: cyclomatic complexity 18 of function TestCursor_Iterate_Leaf() is high (> 15) (gocyclo)
    • Line 36: warning: cyclomatic complexity 18 of function TestCursor_Seek() is high (> 15) (gocyclo)
    • Line 354: warning: cyclomatic complexity 18 of function TestCursor_LeafRootReverse() is high (> 15) (gocyclo)
    • bolt/node.go
    • Line 409: warning: cyclomatic complexity 16 of function (*node).rebalance() is high (> 15) (gocyclo)
    • bolt/tx.go
    • Line 144: warning: cyclomatic complexity 16 of function (*Tx).Commit() is high (> 15) (gocyclo)
    • bolt/bucket_test.go
    • Line 1416: warning: cyclomatic complexity 26 of function TestBucket_Stats_Nested() is high (> 15) (gocyclo)
    • Line 1518: warning: cyclomatic complexity 22 of function TestBucket_Stats_Large() is high (> 15) (gocyclo)
    • Line 1137: warning: cyclomatic complexity 22 of function TestBucket_Stats() is high (> 15) (gocyclo)
    • Line 1292: warning: cyclomatic complexity 19 of function TestBucket_Stats_Small() is high (> 15) (gocyclo)
    • Line 1224: warning: cyclomatic complexity 18 of function TestBucket_Stats_RandomFill() is high (> 15) (gocyclo)
    • Line 1356: warning: cyclomatic complexity 18 of function TestBucket_Stats_EmptyBucket() is high (> 15) (gocyclo)
    • Line 429: warning: cyclomatic complexity 17 of function TestBucket_Nested() is high (> 15) (gocyclo)
    • Line 952: warning: cyclomatic complexity 17 of function TestBucket_ForEach() is high (> 15) (gocyclo)

golint82%

Golint is a linter for Go source code.

    • bolt/page.go
    • Line 144: warning: receiver name a should be consistent with previous receiver name s for pgids (golint)
    • bolt/cmd/bolt/main.go
    • Line 1301: warning: comment on exported method BenchResults.WriteOpDuration should be of the form "WriteOpDuration ..." (golint)
    • Line 1309: warning: comment on exported method BenchResults.WriteOpsPerSecond should be of the form "WriteOpsPerSecond ..." (golint)
    • Line 1318: warning: comment on exported method BenchResults.ReadOpDuration should be of the form "ReadOpDuration ..." (golint)
    • Line 1326: warning: comment on exported method BenchResults.ReadOpsPerSecond should be of the form "ReadOpsPerSecond ..." (golint)
    • Line 1335: warning: exported type PageError should have comment or be unexported (golint)
    • bolt/bucket.go
    • Line 397: warning: comment on exported method Bucket.Stats should be of the form "Stats ..." (golint)
    • Line 753: warning: exported method BucketStats.Add should have comment or be unexported (golint)
    • bolt/db.go
    • Line 749: warning: error var trySolo should have name of the form errFoo (golint)
    • Line 785: warning: comment on exported method DB.Info should be of the form "Info ..." (golint)
    • Line 890: warning: exported method DB.IsReadOnly should have comment or be unexported (golint)
    • Line 965: warning: exported type Info should have comment or be unexported (golint)
    • bolt/freelist.go
    • Line 41: warning: don't use underscores in Go names; method free_count should be freeCount (golint)
    • Line 46: warning: don't use underscores in Go names; method pending_count should be pendingCount (golint)
    • bolt/freelist_test.go
    • Line 140: warning: don't use underscores in Go names; func benchmark_FreelistRelease should be benchmarkFreelistRelease (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign97%

IneffAssign detects ineffectual assignments in Go code.


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!