Preparing report...

Report for github.com/aldor007/mort

(v0.21.5)

A+    Excellent!    Found 25 issues across 74 files

Tweet

gofmt95%

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!


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.

    • pkg/transforms/transforms.go
    • Line 515: warning: cyclomatic complexity 24 of function (*Transforms).BimgOptions() is high (> 15) (gocyclo)
    • Line 350: warning: cyclomatic complexity 19 of function (*Transforms).Merge() is high (> 15) (gocyclo)
    • pkg/storage/storage.go
    • Line 322: warning: cyclomatic complexity 18 of function getClient() is high (> 15) (gocyclo)
    • Line 215: warning: cyclomatic complexity 17 of function List() is high (> 15) (gocyclo)

golint74%

Golint is a linter for Go source code.

    • pkg/object/tengo/transform.go
    • Line 9: warning: exported type Transform should have comment or be unexported (golint)
    • Line 18: warning: exported method Transform.BinaryOp should have comment or be unexported (golint)
    • Line 22: warning: exported method Transform.IsFalsy should have comment or be unexported (golint)
    • Line 26: warning: exported method Transform.Equals should have comment or be unexported (golint)
    • Line 30: warning: exported method Transform.Copy should have comment or be unexported (golint)
    • Line 36: warning: exported method Transform.TypeName should have comment or be unexported (golint)
    • pkg/object/tengo/transforms.go
    • Line 12: warning: exported type Transforms should have comment or be unexported (golint)
    • Line 21: warning: exported method Transforms.BinaryOp should have comment or be unexported (golint)
    • Line 25: warning: exported method Transforms.IsFalsy should have comment or be unexported (golint)
    • Line 29: warning: exported method Transforms.Equals should have comment or be unexported (golint)
    • Line 33: warning: exported method Transforms.Copy should have comment or be unexported (golint)
    • Line 41: warning: exported method Transforms.TypeName should have comment or be unexported (golint)
    • pkg/config/types.go
    • Line 9: warning: comment on exported type Filters should be of the form "Filters ..." (with optional leading article) (golint)
    • Line 74: warning: exported method Transform.ForParser should have comment or be unexported (golint)
    • Line 135: warning: exported method StorageTypes.Noop should have comment or be unexported (golint)
    • pkg/object/tengo/filters.go
    • Line 35: warning: exported method Filters.Copy should have comment or be unexported (golint)
    • Line 41: warning: exported method Filters.TypeName should have comment or be unexported (golint)
    • pkg/object/tengo/preset.go
    • Line 39: warning: exported method Preset.Copy should have comment or be unexported (golint)
    • Line 45: warning: exported method Preset.TypeName should have comment or be unexported (golint)
    • pkg/object/tengo/regexp.go
    • Line 36: warning: exported method Regexp.Copy should have comment or be unexported (golint)
    • Line 42: warning: exported method Regexp.TypeName should have comment or be unexported (golint)
    • Line 46: warning: exported method Regexp.CanCall should have comment or be unexported (golint)
    • pkg/lock/redis.go
    • Line 51: warning: comment on exported function NewRedisLock should be of the form "NewRedisLock ..." (golint)
    • Line 68: warning: exported function NewRedisCluster should have comment or be unexported (golint)
    • pkg/object/tengo/url.go
    • Line 49: warning: exported method URL.IndexGet should have comment or be unexported (golint)
    • Line 93: warning: exported method URL.TypeName should have comment or be unexported (golint)
    • pkg/transforms/transforms.go
    • Line 123: warning: exported function New should have comment or be unexported (golint)
    • Line 128: warning: exported method Transforms.ToJSON should have comment or be unexported (golint)
    • Line 230: warning: comment on exported method Transforms.ResizeCropAuto should be of the form "ResizeCropAuto ..." (golint)
    • Line 283: warning: exported method Transforms.HashStr should have comment or be unexported (golint)
    • pkg/response/response.go
    • Line 213: warning: exported method Response.SetTransforms should have comment or be unexported (golint)
    • Line 284: warning: exported method Response.IsCacheable should have comment or be unexported (golint)
    • Line 289: warning: exported method Response.GetTTL should have comment or be unexported (golint)
    • Line 306: warning: exported method Response.EncodeMsgpack should have comment or be unexported (golint)
    • Line 310: warning: exported method Response.DecodeMsgpack should have comment or be unexported (golint)
    • pkg/object/file_object.go
    • Line 47: warning: exported function NewFileErrorObject should have comment or be unexported (golint)
    • Line 103: warning: comment on exported method FileObject.Type should be of the form "Type ..." (golint)
    • Line 118: warning: context.Context should be the first parameter of a function (golint)
    • Line 131: warning: exported method FileObject.GetResponseCacheKey should have comment or be unexported (golint)
    • Line 135: warning: exported method FileObject.Copy should have comment or be unexported (golint)
    • Line 155: warning: receiver name obj should be consistent with previous receiver name o for FileObject (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign98%

IneffAssign detects ineffectual assignments in Go code.


misspell97%

Misspell Finds commonly misspelled English words