Preparing report...

Report for github.com/octu0/concache

A    Great!    Found 6 issues across 8 files

Tweet

gofmt87%

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!


gocyclo87%

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.

    • concache/cache_test.go
    • Line 177: warning: cyclomatic complexity 26 of function TestUpsertConcurrent() is high (> 15) (gocyclo)
    • Line 103: warning: cyclomatic complexity 16 of function TestUpsertBasic() is high (> 15) (gocyclo)

golint37%

Golint is a linter for Go source code.

    • concache/cache.go
    • Line 8: warning: exported type CacheGetSetDelete should have comment or be unexported (golint)
    • Line 16: warning: exported type UpsertCb should have comment or be unexported (golint)
    • Line 18: warning: exported type CacheGetSetUpsertDelete should have comment or be unexported (golint)
    • Line 22: warning: exported type CacheItemCount should have comment or be unexported (golint)
    • Line 25: warning: exported type CacheItemDeleteExpire should have comment or be unexported (golint)
    • Line 37: warning: exported type Cache should have comment or be unexported (golint)
    • Line 46: warning: exported function New should have comment or be unexported (golint)
    • Line 74: warning: exported method Cache.Set should have comment or be unexported (golint)
    • Line 81: warning: exported method Cache.SetDefault should have comment or be unexported (golint)
    • Line 84: warning: exported method Cache.SetNoExpire should have comment or be unexported (golint)
    • Line 88: warning: exported method Cache.Upsert should have comment or be unexported (golint)
    • Line 106: warning: exported method Cache.UpsertDefault should have comment or be unexported (golint)
    • Line 109: warning: exported method Cache.UpsertNoExpire should have comment or be unexported (golint)
    • Line 113: warning: exported method Cache.Get should have comment or be unexported (golint)
    • Line 129: warning: exported method Cache.Delete should have comment or be unexported (golint)
    • Line 143: warning: exported method Cache.Count should have comment or be unexported (golint)
    • Line 158: warning: exported method Cache.DeleteExpired should have comment or be unexported (golint)
    • concache/janitor.go
    • Line 7: warning: exported type JanitorDone should have comment or be unexported (golint)
    • Line 9: warning: exported type Janitor should have comment or be unexported (golint)
    • Line 32: warning: exported method Janitor.Run should have comment or be unexported (golint)
    • Line 35: warning: exported method Janitor.Stop should have comment or be unexported (golint)
    • concache/options.go
    • Line 7: warning: exported type EvictedCb should have comment or be unexported (golint)
    • Line 8: warning: exported type DeletedCb should have comment or be unexported (golint)
    • Line 10: warning: exported type OptionsFunc should have comment or be unexported (golint)
    • Line 12: warning: exported type Options should have comment or be unexported (golint)
    • Line 20: warning: exported function DefaultShardSize should have comment or be unexported (golint)
    • Line 25: warning: exported function ShardSize should have comment or be unexported (golint)
    • Line 30: warning: exported function DefaultExpiration should have comment or be unexported (golint)
    • Line 35: warning: exported function CleanupInterval should have comment or be unexported (golint)
    • Line 40: warning: exported function Evicted should have comment or be unexported (golint)
    • Line 45: warning: exported function Deleted should have comment or be unexported (golint)
    • concache/shard.go
    • Line 9: warning: exported const DEFAULT_SHARD_COUNT should have comment (or a comment on this block) or be unexported (golint)
    • Line 14: warning: exported type CacheItem should have comment or be unexported (golint)
    • Line 19: warning: exported method CacheItem.Expired should have comment or be unexported (golint)
    • Line 22: warning: exported method CacheItem.ExpiredFrom should have comment or be unexported (golint)
    • Line 32: warning: exported type MapShard should have comment or be unexported (golint)
    • Line 37: warning: exported type CacheMap should have comment or be unexported (golint)
    • Line 58: warning: exported method MapShard.GetShard should have comment or be unexported (golint)
    • Line 62: warning: exported method MapShard.GetShards should have comment or be unexported (golint)
    • concache/version.go
    • Line 4: warning: exported const Version should have comment (or a comment on this block) or be unexported (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!