Preparing report...

Report for github.com/kevburnsjr/microcache

A+    Excellent!    Found 9 issues across 22 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!


gocyclo90%

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.

    • microcache/microcache.go
    • Line 184: warning: cyclomatic complexity 30 of function (*microcache).Middleware() is high (> 15) (gocyclo)
    • Line 319: warning: cyclomatic complexity 21 of function (*microcache).handleBackendResponse() is high (> 15) (gocyclo)

golint63%

Golint is a linter for Go source code.

    • microcache/microcache.go
    • Line 1: warning: package comment should be of the form "Package microcache ..." (golint)
    • Line 12: warning: exported type Microcache should have comment or be unexported (golint)
    • Line 47: warning: exported type Config should have comment or be unexported (golint)
    • Line 312: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • microcache/response.go
    • Line 26: warning: exported method Response.Header should have comment or be unexported (golint)
    • Line 30: warning: exported method Response.WriteHeader should have comment or be unexported (golint)
    • microcache/compressor_gzip.go
    • Line 13: warning: exported method CompressorGzip.Compress should have comment or be unexported (golint)
    • Line 23: warning: exported method CompressorGzip.Expand should have comment or be unexported (golint)
    • microcache/compressor_snappy.go
    • Line 14: warning: exported method CompressorSnappy.Compress should have comment or be unexported (golint)
    • Line 20: warning: exported method CompressorSnappy.Expand should have comment or be unexported (golint)
    • microcache/driver_arc.go
    • Line 36: warning: exported method DriverARC.SetRequestOpts should have comment or be unexported (golint)
    • Line 41: warning: exported method DriverARC.GetRequestOpts should have comment or be unexported (golint)
    • Line 49: warning: exported method DriverARC.Set should have comment or be unexported (golint)
    • Line 54: warning: exported method DriverARC.Get should have comment or be unexported (golint)
    • Line 62: warning: exported method DriverARC.Remove should have comment or be unexported (golint)
    • Line 67: warning: exported method DriverARC.GetSize should have comment or be unexported (golint)
    • microcache/driver_lru.go
    • Line 31: warning: exported method DriverLRU.SetRequestOpts should have comment or be unexported (golint)
    • Line 36: warning: exported method DriverLRU.GetRequestOpts should have comment or be unexported (golint)
    • Line 44: warning: exported method DriverLRU.Set should have comment or be unexported (golint)
    • Line 49: warning: exported method DriverLRU.Get should have comment or be unexported (golint)
    • Line 57: warning: exported method DriverLRU.Remove should have comment or be unexported (golint)
    • Line 62: warning: exported method DriverLRU.GetSize should have comment or be unexported (golint)
    • microcache/driver_ristretto.go
    • Line 77: warning: exported method DriverRistretto.SetRequestOpts should have comment or be unexported (golint)
    • Line 82: warning: exported method DriverRistretto.GetRequestOpts should have comment or be unexported (golint)
    • Line 90: warning: exported method DriverRistretto.Set should have comment or be unexported (golint)
    • Line 95: warning: exported method DriverRistretto.Get should have comment or be unexported (golint)
    • Line 103: warning: exported method DriverRistretto.Remove should have comment or be unexported (golint)
    • Line 108: warning: exported method DriverRistretto.GetSize should have comment 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!