Preparing report...

Report for github.com/ant-libs-go/flow

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


golint0%

Golint is a linter for Go source code.

    • flow/examples/parallel/main.go
    • Line 17: warning: exported type TestAPloy should have comment or be unexported (golint)
    • Line 21: warning: exported method TestAPloy.Run should have comment or be unexported (golint)
    • Line 32: warning: exported type TestBPloy should have comment or be unexported (golint)
    • Line 36: warning: exported method TestBPloy.Run should have comment or be unexported (golint)
    • Line 47: warning: exported type PContext should have comment or be unexported (golint)
    • flow/examples/chain/main.go
    • Line 17: warning: exported type TestAPloy should have comment or be unexported (golint)
    • Line 21: warning: exported method TestAPloy.Run should have comment or be unexported (golint)
    • Line 30: warning: exported type TestBPloy should have comment or be unexported (golint)
    • Line 34: warning: exported method TestBPloy.Run should have comment or be unexported (golint)
    • Line 43: warning: exported type TestSwitch should have comment or be unexported (golint)
    • Line 47: warning: exported method TestSwitch.Run should have comment or be unexported (golint)
    • Line 47: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 53: warning: exported type PContext should have comment or be unexported (golint)
    • flow/context.go
    • Line 12: warning: exported type FlowContext should have comment or be unexported (golint)
    • Line 24: warning: exported type CoreContext should have comment or be unexported (golint)
    • Line 29: warning: exported method CoreContext.Lock should have comment or be unexported (golint)
    • Line 29: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 30: warning: exported method CoreContext.UnLock should have comment or be unexported (golint)
    • Line 30: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 31: warning: exported method CoreContext.RLock should have comment or be unexported (golint)
    • Line 31: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 32: warning: exported method CoreContext.RUnLock should have comment or be unexported (golint)
    • Line 32: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 34: warning: exported method CoreContext.AddError should have comment or be unexported (golint)
    • Line 34: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 43: warning: exported method CoreContext.HasError should have comment or be unexported (golint)
    • Line 43: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 53: warning: exported method CoreContext.GetError should have comment or be unexported (golint)
    • Line 53: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 63: warning: exported method CoreContext.GetErrors should have comment or be unexported (golint)
    • Line 63: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 70: warning: exported method CoreContext.CleanErrors should have comment or be unexported (golint)
    • Line 70: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • flow/main.go
    • Line 10: warning: exported function New should have comment or be unexported (golint)
    • flow/examples/complex/main.go
    • Line 17: warning: exported type TestAPloy should have comment or be unexported (golint)
    • Line 21: warning: exported method TestAPloy.Run should have comment or be unexported (golint)
    • Line 30: warning: exported type TestBPloy should have comment or be unexported (golint)
    • Line 34: warning: exported method TestBPloy.Run should have comment or be unexported (golint)
    • Line 43: warning: exported type TestSwitch should have comment or be unexported (golint)
    • Line 47: warning: exported method TestSwitch.Run should have comment or be unexported (golint)
    • Line 47: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 53: warning: exported type PContext should have comment or be unexported (golint)
    • flow/flow_parallel.go
    • Line 14: warning: exported type ParallelFlow should have comment or be unexported (golint)
    • Line 19: warning: exported function NewParallelFlow should have comment or be unexported (golint)
    • Line 26: warning: exported method ParallelFlow.AddPloy should have comment or be unexported (golint)
    • Line 26: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 33: warning: exported method ParallelFlow.AddPloyFunc should have comment or be unexported (golint)
    • Line 33: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 40: warning: exported method ParallelFlow.AddFlow should have comment or be unexported (golint)
    • Line 40: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 47: warning: exported method ParallelFlow.AddHook should have comment or be unexported (golint)
    • Line 47: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 52: warning: exported method ParallelFlow.SetMaxProcess should have comment or be unexported (golint)
    • Line 52: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 57: warning: exported method ParallelFlow.Run should have comment or be unexported (golint)
    • Line 57: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • flow/flow_pipe.go
    • Line 10: warning: exported type PipeFlow should have comment or be unexported (golint)
    • Line 14: warning: exported function NewPipeFlow should have comment or be unexported (golint)
    • Line 20: warning: exported method PipeFlow.AddPloy should have comment or be unexported (golint)
    • Line 20: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 27: warning: exported method PipeFlow.AddPloyFunc should have comment or be unexported (golint)
    • Line 27: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 34: warning: exported method PipeFlow.AddFlow should have comment or be unexported (golint)
    • Line 34: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 41: warning: exported method PipeFlow.AddHook should have comment or be unexported (golint)
    • Line 41: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 46: warning: exported method PipeFlow.Run should have comment or be unexported (golint)
    • Line 46: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • flow/hook.go
    • Line 10: warning: exported type Hook should have comment or be unexported (golint)
    • Line 25: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 31: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 40: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • flow/ploy.go
    • Line 10: warning: exported type Ploy should have comment or be unexported (golint)
    • Line 12: warning: exported type PloyFunc should have comment or be unexported (golint)
    • Line 14: warning: exported method PloyFunc.Run should have comment or be unexported (golint)
    • Line 14: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • flow/examples/switch/main.go
    • Line 17: warning: exported type TestAPloy should have comment or be unexported (golint)
    • Line 21: warning: exported method TestAPloy.Run should have comment or be unexported (golint)
    • Line 30: warning: exported type TestBPloy should have comment or be unexported (golint)
    • Line 34: warning: exported method TestBPloy.Run should have comment or be unexported (golint)
    • Line 43: warning: exported type TestSwitch should have comment or be unexported (golint)
    • Line 47: warning: exported method TestSwitch.Run should have comment or be unexported (golint)
    • Line 47: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 53: warning: exported type PContext should have comment or be unexported (golint)
    • flow/examples/pipe/main.go
    • Line 17: warning: exported type TestAPloy should have comment or be unexported (golint)
    • Line 21: warning: exported method TestAPloy.Run should have comment or be unexported (golint)
    • Line 30: warning: exported type TestBPloy should have comment or be unexported (golint)
    • Line 34: warning: exported method TestBPloy.Run should have comment or be unexported (golint)
    • Line 43: warning: exported type PContext should have comment or be unexported (golint)
    • flow/examples/hook/main.go
    • Line 18: warning: exported type TestAPloy should have comment or be unexported (golint)
    • Line 22: warning: exported method TestAPloy.Run should have comment or be unexported (golint)
    • Line 31: warning: exported type TestBPloy should have comment or be unexported (golint)
    • Line 35: warning: exported method TestBPloy.Run should have comment or be unexported (golint)
    • Line 44: warning: exported type TestCPloy should have comment or be unexported (golint)
    • Line 48: warning: exported method TestCPloy.Run should have comment or be unexported (golint)
    • Line 57: warning: exported type TestSwitch should have comment or be unexported (golint)
    • Line 61: warning: exported method TestSwitch.Run should have comment or be unexported (golint)
    • Line 61: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 67: warning: exported type TestHook should have comment or be unexported (golint)
    • Line 71: warning: exported method TestHook.Before should have comment or be unexported (golint)
    • Line 71: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 77: warning: exported method TestHook.After should have comment or be unexported (golint)
    • Line 77: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 83: warning: exported type TestHook2 should have comment or be unexported (golint)
    • Line 87: warning: exported method TestHook2.Before should have comment or be unexported (golint)
    • Line 87: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 93: warning: exported method TestHook2.After should have comment or be unexported (golint)
    • Line 93: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 99: warning: exported type PContext should have comment or be unexported (golint)
    • flow/flow_switch.go
    • Line 12: warning: exported const DEFAULT_SWITCH_RUNNABLE should have comment or be unexported (golint)
    • Line 14: warning: exported type Switch should have comment or be unexported (golint)
    • Line 18: warning: exported type SwitchFunc should have comment or be unexported (golint)
    • Line 20: warning: exported method SwitchFunc.Run should have comment or be unexported (golint)
    • Line 20: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 22: warning: exported type SwitchFlow should have comment or be unexported (golint)
    • Line 28: warning: exported function NewSwitchFlow should have comment or be unexported (golint)
    • Line 35: warning: exported method SwitchFlow.AddPloy should have comment or be unexported (golint)
    • Line 35: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 43: warning: exported method SwitchFlow.AddPloyFunc should have comment or be unexported (golint)
    • Line 43: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 50: warning: exported method SwitchFlow.AddFlow should have comment or be unexported (golint)
    • Line 50: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 58: warning: exported method SwitchFlow.AddHook should have comment or be unexported (golint)
    • Line 58: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 63: warning: exported method SwitchFlow.SetSwitch should have comment or be unexported (golint)
    • Line 63: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 67: warning: exported method SwitchFlow.SetSwitchFunc should have comment or be unexported (golint)
    • Line 67: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 72: warning: exported method SwitchFlow.Run should have comment or be unexported (golint)
    • Line 72: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • flow/examples/func/main.go
    • Line 17: warning: exported type TestAPloy should have comment or be unexported (golint)
    • Line 21: warning: exported method TestAPloy.Run should have comment or be unexported (golint)
    • Line 30: warning: exported type TestBPloy should have comment or be unexported (golint)
    • Line 34: warning: exported method TestBPloy.Run should have comment or be unexported (golint)
    • Line 43: warning: exported type TestSwitch should have comment or be unexported (golint)
    • Line 47: warning: exported method TestSwitch.Run should have comment or be unexported (golint)
    • Line 47: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 53: warning: exported type PContext should have comment or be unexported (golint)
    • flow/flow.go
    • Line 10: warning: exported type Flow should have comment or be unexported (golint)
    • Line 14: warning: exported type CommonFlow should have comment or be unexported (golint)
    • Line 19: warning: exported function NewCommonFlow should have comment or be unexported (golint)
    • Line 25: warning: exported method CommonFlow.AddPloy should have comment or be unexported (golint)
    • Line 25: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 29: warning: exported method CommonFlow.AddFlow should have comment or be unexported (golint)
    • Line 29: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 33: warning: exported method CommonFlow.AddHook should have comment or be unexported (golint)
    • Line 33: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • flow/flow_goto.go
    • Line 15: warning: error var BreakError should have name of the form ErrFoo (golint)
    • Line 15: warning: exported var BreakError should have comment or be unexported (golint)
    • Line 17: warning: exported type Goto should have comment or be unexported (golint)
    • Line 21: warning: exported type GotoFunc should have comment or be unexported (golint)
    • Line 23: warning: exported method GotoFunc.Run should have comment or be unexported (golint)
    • Line 23: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 25: warning: exported type GotoFlow should have comment or be unexported (golint)
    • Line 31: warning: exported function NewGotoFlow should have comment or be unexported (golint)
    • Line 38: warning: exported method GotoFlow.AddPloy should have comment or be unexported (golint)
    • Line 38: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 46: warning: exported method GotoFlow.AddPloyFunc should have comment or be unexported (golint)
    • Line 46: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 53: warning: exported method GotoFlow.AddFlow should have comment or be unexported (golint)
    • Line 53: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 61: warning: exported method GotoFlow.AddHook should have comment or be unexported (golint)
    • Line 61: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 66: warning: exported method GotoFlow.SetGoto should have comment or be unexported (golint)
    • Line 66: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 70: warning: exported method GotoFlow.SetGotoFunc should have comment or be unexported (golint)
    • Line 70: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 75: warning: exported method GotoFlow.Run should have comment or be unexported (golint)
    • Line 75: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • flow/examples/error/main.go
    • Line 18: warning: exported type TestAPloy should have comment or be unexported (golint)
    • Line 22: warning: exported method TestAPloy.Run should have comment or be unexported (golint)
    • Line 31: warning: exported type TestBPloy should have comment or be unexported (golint)
    • Line 35: warning: exported method TestBPloy.Run should have comment or be unexported (golint)
    • Line 44: warning: exported type TestCPloy should have comment or be unexported (golint)
    • Line 48: warning: exported method TestCPloy.Run should have comment or be unexported (golint)
    • Line 59: warning: exported type TestSwitch should have comment or be unexported (golint)
    • Line 63: warning: exported method TestSwitch.Run should have comment or be unexported (golint)
    • Line 63: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 69: warning: exported type PContext 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!