Preparing report...

Report for github.com/karlseguin/ccache

A    Great!    Found 11 issues across 13 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!


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.

    • ccache/cache.go
    • Line 294: warning: cyclomatic complexity 19 of function (*Cache).worker() is high (> 15) (gocyclo)

golint15%

Golint is a linter for Go source code.

    • ccache/bucket_test.go
    • Line 17: warning: receiver name should not be an underscore, omit the name if it is unused (golint)
    • Line 22: warning: receiver name should not be an underscore, omit the name if it is unused (golint)
    • Line 28: warning: receiver name should not be an underscore, omit the name if it is unused (golint)
    • Line 34: warning: receiver name should not be an underscore, omit the name if it is unused (golint)
    • Line 43: warning: receiver name should not be an underscore, omit the name if it is unused (golint)
    • ccache/cache.go
    • Line 1: warning: package comment should be of the form "Package ccache ..." (golint)
    • Line 38: warning: exported type Cache should have comment or be unexported (golint)
    • Line 49: warning: comment on exported function New should be of the form "New ..." (golint)
    • Line 68: warning: exported method Cache.ItemCount should have comment or be unexported (golint)
    • Line 76: warning: exported method Cache.DeletePrefix should have comment or be unexported (golint)
    • Line 84: warning: comment on exported method Cache.DeleteFunc should be of the form "DeleteFunc ..." (golint)
    • Line 93: warning: exported method Cache.ForEachFunc should have comment or be unexported (golint)
    • Line 116: warning: comment on exported method Cache.TrackingGet should be of the form "TrackingGet ..." (golint)
    • Line 127: warning: comment on exported method Cache.TrackingSet should be of the form "TrackingSet ..." (golint)
    • Line 150: warning: comment on exported method Cache.Fetch should be of the form "Fetch ..." (golint)
    • Line 168: warning: comment on exported method Cache.Delete should be of the form "Delete ..." (golint)
    • Line 178: warning: comment on exported method Cache.Clear should be of the form "Clear ..." (golint)
    • Line 186: warning: comment on exported method Cache.Stop should be of the form "Stop ..." (golint)
    • Line 194: warning: comment on exported method Cache.GetDropped should be of the form "GetDropped ..." (golint)
    • Line 231: warning: comment on exported method Cache.SetMaxSize should be of the form "SetMaxSize ..." (golint)
    • Line 240: warning: comment on exported method Cache.GC should be of the form "GC ..." (golint)
    • Line 249: warning: comment on exported method Cache.GetSize should be of the form "GetSize ..." (golint)
    • ccache/layeredcache.go
    • Line 1: warning: package comment should be of the form "Package ccache ..." (golint)
    • Line 11: warning: exported type LayeredCache should have comment or be unexported (golint)
    • Line 34: warning: comment on exported function Layered should be of the form "Layered ..." (golint)
    • Line 53: warning: exported method LayeredCache.ItemCount should have comment or be unexported (golint)
    • Line 76: warning: exported method LayeredCache.ForEachFunc should have comment or be unexported (golint)
    • Line 80: warning: comment on exported method LayeredCache.GetOrCreateSecondaryCache should be of the form "GetOrCreateSecondaryCache ..." (golint)
    • Line 98: warning: comment on exported method LayeredCache.TrackingGet should be of the form "TrackingGet ..." (golint)
    • Line 109: warning: comment on exported method LayeredCache.TrackingSet should be of the form "TrackingSet ..." (golint)
    • Line 131: warning: comment on exported method LayeredCache.Fetch should be of the form "Fetch ..." (golint)
    • Line 149: warning: comment on exported method LayeredCache.Delete should be of the form "Delete ..." (golint)
    • Line 159: warning: comment on exported method LayeredCache.DeleteAll should be of the form "DeleteAll ..." (golint)
    • Line 164: warning: comment on exported method LayeredCache.DeletePrefix should be of the form "DeletePrefix ..." (golint)
    • Line 169: warning: comment on exported method LayeredCache.DeleteFunc should be of the form "DeleteFunc ..." (golint)
    • Line 174: warning: comment on exported method LayeredCache.Clear should be of the form "Clear ..." (golint)
    • Line 181: warning: exported method LayeredCache.Stop should have comment or be unexported (golint)
    • Line 186: warning: comment on exported method LayeredCache.GetDropped should be of the form "GetDropped ..." (golint)
    • Line 198: warning: comment on exported method LayeredCache.SetMaxSize should be of the form "SetMaxSize ..." (golint)
    • Line 206: warning: comment on exported method LayeredCache.GC should be of the form "GC ..." (golint)
    • Line 215: warning: comment on exported method LayeredCache.GetSize should be of the form "GetSize ..." (golint)
    • ccache/layeredcache_test.go
    • Line 19: warning: receiver name should not be an underscore, omit the name if it is unused (golint)
    • Line 25: warning: receiver name should not be an underscore, omit the name if it is unused (golint)
    • Line 33: warning: receiver name should not be an underscore, omit the name if it is unused (golint)
    • Line 48: warning: receiver name should not be an underscore, omit the name if it is unused (golint)
    • Line 54: warning: receiver name should not be an underscore, omit the name if it is unused (golint)
    • Line 63: warning: receiver name should not be an underscore, omit the name if it is unused (golint)
    • Line 76: warning: receiver name should not be an underscore, omit the name if it is unused (golint)
    • Line 100: warning: receiver name should not be an underscore, omit the name if it is unused (golint)
    • Line 129: warning: receiver name should not be an underscore, omit the name if it is unused (golint)
    • Line 154: warning: receiver name should not be an underscore, omit the name if it is unused (golint)
    • Line 166: warning: receiver name should not be an underscore, omit the name if it is unused (golint)
    • Line 183: warning: receiver name should not be an underscore, omit the name if it is unused (golint)
    • Line 197: warning: receiver name should not be an underscore, omit the name if it is unused (golint)
    • Line 215: warning: receiver name should not be an underscore, omit the name if it is unused (golint)
    • Line 233: warning: receiver name should not be an underscore, omit the name if it is unused (golint)
    • Line 267: warning: receiver name should not be an underscore, omit the name if it is unused (golint)
    • Line 280: warning: receiver name should not be an underscore, omit the name if it is unused (golint)
    • Line 301: warning: receiver name should not be an underscore, omit the name if it is unused (golint)
    • Line 311: warning: receiver name should not be an underscore, omit the name if it is unused (golint)
    • Line 329: warning: receiver name should not be an underscore, omit the name if it is unused (golint)
    • ccache/secondarycache.go
    • Line 5: warning: exported type SecondaryCache should have comment or be unexported (golint)
    • Line 63: warning: comment on exported method SecondaryCache.TrackingGet should be of the form "TrackingGet ..." (golint)
    • Line 65: warning: receiver name c should be consistent with previous receiver name s for SecondaryCache (golint)
    • ccache/cache_test.go
    • Line 19: warning: receiver name should not be an underscore, omit the name if it is unused (golint)
    • Line 34: warning: receiver name should not be an underscore, omit the name if it is unused (golint)
    • Line 58: warning: receiver name should not be an underscore, omit the name if it is unused (golint)
    • Line 88: warning: receiver name should not be an underscore, omit the name if it is unused (golint)
    • Line 110: warning: receiver name should not be an underscore, omit the name if it is unused (golint)
    • Line 121: warning: receiver name should not be an underscore, omit the name if it is unused (golint)
    • Line 133: warning: receiver name should not be an underscore, omit the name if it is unused (golint)
    • Line 147: warning: receiver name should not be an underscore, omit the name if it is unused (golint)
    • Line 165: warning: receiver name should not be an underscore, omit the name if it is unused (golint)
    • Line 185: warning: receiver name should not be an underscore, omit the name if it is unused (golint)
    • Line 200: warning: receiver name should not be an underscore, omit the name if it is unused (golint)
    • Line 220: warning: receiver name should not be an underscore, omit the name if it is unused (golint)
    • Line 230: warning: receiver name should not be an underscore, omit the name if it is unused (golint)
    • Line 248: warning: receiver name should not be an underscore, omit the name if it is unused (golint)
    • Line 280: warning: receiver name should not be an underscore, omit the name if it is unused (golint)
    • ccache/configuration.go
    • Line 3: warning: exported type Configuration should have comment or be unexported (golint)
    • Line 14: warning: comment on exported function Configure should be of the form "Configure ..." (golint)
    • Line 29: warning: comment on exported method Configuration.MaxSize should be of the form "MaxSize ..." (golint)
    • Line 36: warning: comment on exported method Configuration.Buckets should be of the form "Buckets ..." (golint)
    • Line 47: warning: comment on exported method Configuration.ItemsToPrune should be of the form "ItemsToPrune ..." (golint)
    • Line 54: warning: comment on exported method Configuration.PromoteBuffer should be of the form "PromoteBuffer ..." (golint)
    • Line 62: warning: comment on exported method Configuration.DeleteBuffer should be of the form "DeleteBuffer ..." (golint)
    • Line 69: warning: comment on exported method Configuration.GetsPerPromote should be of the form "GetsPerPromote ..." (golint)
    • Line 89: warning: comment on exported method Configuration.Track should be of the form "Track ..." (golint)
    • ccache/item.go
    • Line 10: warning: exported type Sized should have comment or be unexported (golint)
    • Line 14: warning: exported type TrackedItem should have comment or be unexported (golint)
    • Line 28: warning: receiver name i should be consistent with previous receiver name n for nilItem (golint)
    • Line 32: warning: receiver name i should be consistent with previous receiver name n for nilItem (golint)
    • Line 36: warning: receiver name i should be consistent with previous receiver name n for nilItem (golint)
    • Line 40: warning: receiver name i should be consistent with previous receiver name n for nilItem (golint)
    • Line 43: warning: exported var NilTracked should have comment or be unexported (golint)
    • Line 45: warning: exported type Item should have comment or be unexported (golint)
    • Line 79: warning: exported method Item.Value should have comment or be unexported (golint)
    • Line 87: warning: exported method Item.Release should have comment or be unexported (golint)
    • Line 91: warning: exported method Item.Expired should have comment or be unexported (golint)
    • Line 96: warning: exported method Item.TTL should have comment or be unexported (golint)
    • Line 101: warning: exported method Item.Expires should have comment or be unexported (golint)
    • Line 106: warning: exported method Item.Extend should have comment or be unexported (golint)
    • ccache/item_test.go
    • Line 17: warning: receiver name should not be an underscore, omit the name if it is unused (golint)
    • Line 23: warning: receiver name should not be an underscore, omit the name if it is unused (golint)
    • Line 31: warning: receiver name should not be an underscore, omit the name if it is unused (golint)
    • Line 39: warning: receiver name should not be an underscore, omit the name if it is unused (golint)
    • Line 45: warning: receiver name should not be an underscore, omit the name if it is unused (golint)
    • ccache/secondarycache_test.go
    • Line 17: warning: receiver name should not be an underscore, omit the name if it is unused (golint)
    • Line 22: warning: receiver name should not be an underscore, omit the name if it is unused (golint)
    • Line 30: warning: receiver name should not be an underscore, omit the name if it is unused (golint)
    • Line 39: warning: receiver name should not be an underscore, omit the name if it is unused (golint)
    • Line 47: warning: receiver name should not be an underscore, omit the name if it is unused (golint)
    • Line 62: warning: receiver name should not be an underscore, omit the name if it is unused (golint)
    • Line 69: warning: receiver name should not be an underscore, omit the name if it is unused (golint)
    • Line 77: warning: receiver name should not be an underscore, omit the name if it is unused (golint)
    • Line 85: warning: receiver name should not be an underscore, omit the name if it is unused (golint)
    • Line 92: warning: receiver name should not be an underscore, omit the name if it is unused (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!