Preparing report...

Report for github.com/asmsh/promise

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


gocyclo95%

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.

    • promise/internal/status/status_test.go
    • Line 218: warning: cyclomatic complexity 45 of function TestPromStatus_Fate_State_Resolving() is high (> 15) (gocyclo)
    • Line 100: warning: cyclomatic complexity 28 of function TestPromStatus_Chain() is high (> 15) (gocyclo)
    • Line 612: warning: cyclomatic complexity 26 of function TestPromStatus_Fate_State_Panicked() is high (> 15) (gocyclo)
    • Line 499: warning: cyclomatic complexity 26 of function TestPromStatus_Fate_State_Rejected() is high (> 15) (gocyclo)
    • Line 386: warning: cyclomatic complexity 26 of function TestPromStatus_Fate_State_Fulfilled() is high (> 15) (gocyclo)

golint76%

Golint is a linter for Go source code.

    • promise/examples/asyncHttp/asynchttp.go
    • Line 23: warning: exported function AsyncGet should have comment or be unexported (golint)
    • Line 46: warning: exported function NewHttpPromise should have comment or be unexported (golint)
    • Line 54: warning: exported method HttpPromise.GetResT should have comment or be unexported (golint)
    • Line 61: warning: exported method HttpPromise.ThenT should have comment or be unexported (golint)
    • Line 71: warning: exported method HttpPromise.CatchT should have comment or be unexported (golint)
    • promise/examples/ctxProm/ctx.go
    • Line 35: warning: context.Context should be the first parameter of a function (golint)
    • Line 35: warning: exported function NewCtxPromise should have comment or be unexported (golint)
    • Line 39: warning: context.Context should be the first parameter of a function (golint)
    • Line 43: warning: exported method CtxPromise.Then should have comment or be unexported (golint)
    • Line 51: warning: exported method CtxPromise.Catch should have comment or be unexported (golint)
    • Line 59: warning: exported method CtxPromise.Recover should have comment or be unexported (golint)
    • Line 67: warning: exported method CtxPromise.Finally should have comment or be unexported (golint)
    • promise/status.go
    • Line 77: warning: comment on exported method Status.IsHandled should be of the form "IsHandled ..." (golint)
    • promise/internal/status/status.go
    • Line 418: warning: exported method PromStatus.SetFulfilledResolved should have comment or be unexported (golint)
    • Line 451: warning: exported method PromStatus.SetRejectedResolved should have comment or be unexported (golint)
    • Line 484: warning: exported method PromStatus.SetPanickedResolved should have comment or be unexported (golint)
    • Line 517: warning: exported method PromStatus.SetHandled should have comment or be unexported (golint)
    • Line 543: warning: exported function IsChainModeRead should have comment or be unexported (golint)
    • Line 547: warning: exported function IsChainModeFollow should have comment or be unexported (golint)
    • Line 558: warning: exported function IsFateUnresolved should have comment or be unexported (golint)
    • Line 562: warning: exported function IsFateResolving should have comment or be unexported (golint)
    • Line 566: warning: exported function IsFateResolved should have comment or be unexported (golint)
    • Line 571: warning: exported function IsFateHandled should have comment or be unexported (golint)
    • Line 576: warning: exported function IsStatePending should have comment or be unexported (golint)
    • Line 581: warning: exported function IsStateFulfilled should have comment or be unexported (golint)
    • Line 586: warning: exported function IsStateRejected should have comment or be unexported (golint)
    • Line 591: warning: exported function IsStatePanicked should have comment or be unexported (golint)
    • Line 596: warning: exported function IsFlagsExternal should have comment or be unexported (golint)
    • Line 601: warning: exported function IsFlagsNotSafe should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign90%

IneffAssign detects ineffectual assignments in Go code.


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!