Preparing report...

Report for github.com/shihuo-cn/mockit

(v1.0.1)

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


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.

    • kit.go
    • Line 194: warning: cyclomatic complexity 16 of function (*mockit).InterfaceExpect() is high (> 15) (gocyclo)

golint12%

Golint is a linter for Go source code.

    • paramter.go
    • Line 39: warning: comment on exported const HttpResponseFunc should be of the form "HttpResponseFunc ..." (golint)
    • Line 41: warning: exported const HttpResponseString should have comment (or a comment on this block) or be unexported (golint)
    • Line 70: warning: exported function NewExpectParam should have comment or be unexported (golint)
    • mockimpl/es.go
    • Line 14: warning: exported function NewMockEs should have comment or be unexported (golint)
    • Line 23: warning: exported type MockEs should have comment or be unexported (golint)
    • Line 27: warning: exported method MockEs.First should have comment or be unexported (golint)
    • Line 31: warning: exported method MockEs.Put should have comment or be unexported (golint)
    • Line 35: warning: exported method MockEs.List should have comment or be unexported (golint)
    • Line 56: warning: exported method MockEs.Aggregate should have comment or be unexported (golint)
    • mockimpl/http.go
    • Line 17: warning: exported function NewMockHttp should have comment or be unexported (golint)
    • Line 25: warning: exported type MockHttp should have comment or be unexported (golint)
    • Line 30: warning: exported method MockHttp.First should have comment or be unexported (golint)
    • Line 49: warning: exported method MockHttp.Put should have comment or be unexported (golint)
    • Line 53: warning: exported method MockHttp.List should have comment or be unexported (golint)
    • Line 73: warning: exported method MockHttp.Aggregate should have comment or be unexported (golint)
    • mockimpl/redis.go
    • Line 13: warning: exported type MockRedis should have comment or be unexported (golint)
    • Line 23: warning: exported method MockRedis.First should have comment or be unexported (golint)
    • Line 32: warning: exported method MockRedis.Put should have comment or be unexported (golint)
    • Line 38: warning: exported method MockRedis.List should have comment or be unexported (golint)
    • Line 42: warning: exported method MockRedis.Aggregate should have comment or be unexported (golint)
    • Line 46: warning: exported function NewMockRedis should have comment or be unexported (golint)
    • iface/interface.go
    • Line 16: warning: exported type DemoType should have comment or be unexported (golint)
    • Line 17: warning: exported type DemoInterfaceModel should have comment or be unexported (golint)
    • Line 34: warning: exported type DemoInnerModel should have comment or be unexported (golint)
    • Line 41: warning: exported type KV should have comment or be unexported (golint)
    • kit.go
    • Line 60: warning: exported type MockClientInitFunc 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!