Preparing report...

Report for github.com/etcd-io/bbolt

A+    Excellent!    Found 11 issues across 46 files

Tweet

gofmt100%

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

No problems detected. Good job!


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!


golint84%

Golint is a linter for Go source code.

    • bbolt/page.go
    • Line 151: warning: receiver name a should be consistent with previous receiver name s for pgids (golint)
    • bbolt/cmd/bbolt/main.go
    • Line 565: warning: comment on exported method PageItemCommand.PrintLeafItemValue should be of the form "PrintLeafItemValue ..." (golint)
    • Line 1694: warning: comment on exported method BenchResults.WriteOpDuration should be of the form "WriteOpDuration ..." (golint)
    • Line 1702: warning: comment on exported method BenchResults.WriteOpsPerSecond should be of the form "WriteOpsPerSecond ..." (golint)
    • Line 1711: warning: comment on exported method BenchResults.ReadOpDuration should be of the form "ReadOpDuration ..." (golint)
    • Line 1719: warning: comment on exported method BenchResults.ReadOpsPerSecond should be of the form "ReadOpsPerSecond ..." (golint)
    • Line 1728: warning: exported type PageError should have comment or be unexported (golint)
    • bbolt/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)
    • bbolt/db.go
    • Line 888: warning: error var trySolo should have name of the form errFoo (golint)
    • Line 924: warning: comment on exported method DB.Info should be of the form "Info ..." (golint)
    • Line 1035: warning: exported method DB.IsReadOnly should have comment or be unexported (golint)
    • Line 1167: warning: exported type Info should have comment or be unexported (golint)
    • bbolt/doc.go
    • Line 1: warning: package comment should be of the form "Package bbolt ..." (golint)
    • bbolt/freelist.go
    • Line 32: warning: don't use underscores in Go names; struct field free_count should be freeCount (golint)
    • Line 88: warning: don't use underscores in Go names; method pending_count should be pendingCount (golint)
    • bbolt/freelist_test.go
    • Line 309: warning: don't use underscores in Go names; func benchmark_FreelistRelease should be benchmarkFreelistRelease (golint)

gocyclo86%

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.

    • bbolt/cmd/bbolt/main.go
    • Line 95: warning: cyclomatic complexity 17 of function (*Main).Run() is high (> 15) (gocyclo)
    • Line 609: warning: cyclomatic complexity 16 of function (*PageCommand).Run() is high (> 15) (gocyclo)
    • bbolt/bucket_test.go
    • Line 1470: warning: cyclomatic complexity 26 of function TestBucket_Stats_Nested() is high (> 15) (gocyclo)
    • Line 1187: warning: cyclomatic complexity 23 of function TestBucket_Stats() is high (> 15) (gocyclo)
    • Line 1572: warning: cyclomatic complexity 22 of function TestBucket_Stats_Large() is high (> 15) (gocyclo)
    • Line 1346: warning: cyclomatic complexity 19 of function TestBucket_Stats_Small() is high (> 15) (gocyclo)
    • Line 1410: warning: cyclomatic complexity 18 of function TestBucket_Stats_EmptyBucket() is high (> 15) (gocyclo)
    • Line 1278: warning: cyclomatic complexity 18 of function TestBucket_Stats_RandomFill() is high (> 15) (gocyclo)
    • Line 479: warning: cyclomatic complexity 17 of function TestBucket_Nested() is high (> 15) (gocyclo)
    • Line 1002: warning: cyclomatic complexity 17 of function TestBucket_ForEach() is high (> 15) (gocyclo)
    • bbolt/db.go
    • Line 184: warning: cyclomatic complexity 19 of function Open() is high (> 15) (gocyclo)
    • bbolt/cursor_test.go
    • Line 354: warning: cyclomatic complexity 18 of function TestCursor_LeafRootReverse() is high (> 15) (gocyclo)
    • Line 36: warning: cyclomatic complexity 18 of function TestCursor_Seek() is high (> 15) (gocyclo)
    • Line 283: warning: cyclomatic complexity 18 of function TestCursor_Iterate_Leaf() is high (> 15) (gocyclo)
    • bbolt/node.go
    • Line 405: warning: cyclomatic complexity 16 of function (*node).rebalance() 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!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!