Preparing report...

Report for github.com/donutloop/toolkit

A+    Excellent!    Found 16 issues across 48 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!


gocyclo100%

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.

No problems detected. Good job!


golint68%

Golint is a linter for Go source code.

    • toolkit/worker/worker.go
    • Line 7: warning: exported type Request should have comment or be unexported (golint)
    • Line 9: warning: exported type Response should have comment or be unexported (golint)
    • Line 21: warning: comment on exported function New should be of the form "New ..." (golint)
    • toolkit/loop/loop.go
    • Line 13: warning: exported function NewLooper should have comment or be unexported (golint)
    • Line 26: warning: exported type Looper should have comment or be unexported (golint)
    • Line 33: warning: exported method Looper.Stop should have comment or be unexported (golint)
    • Line 64: warning: exported type RecoverError should have comment or be unexported (golint)
    • toolkit/bus/bus.go
    • Line 9: warning: comment on exported type HandlerFunc should be of the form "HandlerFunc ..." (with optional leading article) (golint)
    • Line 13: warning: exported type Msg should have comment or be unexported (golint)
    • Line 15: warning: comment on exported type Bus should be of the form "Bus ..." (with optional leading article) (golint)
    • Line 24: warning: exported type InProcBus should have comment or be unexported (golint)
    • Line 30: warning: exported function New should have comment or be unexported (golint)
    • Line 100: warning: comment on exported method InProcBus.AddEventListener should be of the form "AddEventListener ..." (golint)
    • Line 139: warning: exported type ErrHandlerNotFound should have comment or be unexported (golint)
    • Line 145: warning: exported type ErrOverwrite should have comment or be unexported (golint)
    • toolkit/schedule/schedule.go
    • Line 15: warning: exported type Job should have comment or be unexported (golint)
    • Line 17: warning: exported type DebugStack should have comment or be unexported (golint)
    • Line 19: warning: exported type Fifo should have comment or be unexported (golint)
    • Line 54: warning: exported var ErrStoppedScheduler should have comment or be unexported (golint)
    • Line 76: warning: exported method Fifo.Pending should have comment or be unexported (golint)
    • Line 83: warning: exported method Fifo.Scheduled should have comment or be unexported (golint)
    • Line 90: warning: exported method Fifo.Finished should have comment or be unexported (golint)
    • Line 97: warning: exported method Fifo.WaitFinish should have comment or be unexported (golint)
    • toolkit/retry/retry.go
    • Line 14: warning: exported type ExhaustedError should have comment or be unexported (golint)
    • Line 20: warning: exported type Retrier should have comment or be unexported (golint)
    • Line 24: warning: exported type RetryableDo should have comment or be unexported (golint)
    • Line 26: warning: exported function NewRetrier should have comment or be unexported (golint)
    • Line 82: warning: exported type Strategy should have comment or be unexported (golint)
    • Line 86: warning: exported type Exp should have comment or be unexported (golint)
    • Line 90: warning: exported method Exp.Policy should have comment or be unexported (golint)
    • toolkit/internal/ast/ast.go
    • Line 17: warning: exported const DebugMode should have comment (or a comment on this block) or be unexported (golint)
    • Line 20: warning: exported function RenamePackage should have comment or be unexported (golint)
    • Line 27: warning: exported function ChangeType should have comment or be unexported (golint)
    • Line 66: warning: exported function ModifyAst should have comment or be unexported (golint)
    • Line 86: warning: exported type BadFormattedCode should have comment or be unexported (golint)
    • toolkit/debugutil/http_log_round_tripper.go
    • Line 13: warning: exported type LogRoundTripper should have comment or be unexported (golint)
    • Line 19: warning: comment on exported function NewLogRoundTripper should be of the form "NewLogRoundTripper ..." (golint)
    • Line 25: warning: exported method LogRoundTripper.RoundTrip should have comment or be unexported (golint)
    • toolkit/singleton/singleton.go
    • Line 12: warning: exported type ConstructorFunc should have comment or be unexported (golint)
    • Line 14: warning: exported type Singleton should have comment or be unexported (golint)
    • Line 19: warning: comment on exported function NewSingleton should be of the form "NewSingleton ..." (golint)
    • toolkit/xhttp/xhttp.go
    • Line 8: warning: exported type Middleware should have comment or be unexported (golint)
    • Line 10: warning: exported var ErrClientNil should have comment or be unexported (golint)
    • Line 11: warning: exported var ErrMiddlewaresNil should have comment or be unexported (golint)
    • Line 12: warning: exported var ErrMiddlewareNil should have comment or be unexported (golint)
    • toolkit/event/hook.go
    • Line 17: warning: exported method Hooks.Add should have comment or be unexported (golint)
    • Line 60: warning: exported type RecoverError should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign97%

IneffAssign detects ineffectual assignments in Go code.


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!