Preparing report...

Report for github.com/spiral/roadrunner

A+    Excellent!    Found 72 issues across 158 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!


gocyclo97%

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.

    • roadrunner/tests/plugins/http/handler_test.go
    • Line 868: warning: cyclomatic complexity 16 of function TestHandler_Multipart_POST() is high (> 15) (gocyclo)
    • Line 1096: warning: cyclomatic complexity 16 of function TestHandler_Multipart_PATCH() is high (> 15) (gocyclo)
    • Line 982: warning: cyclomatic complexity 16 of function TestHandler_Multipart_PUT() is high (> 15) (gocyclo)

golint56%

Golint is a linter for Go source code.

    • roadrunner/pkg/worker_watcher/container/vec.go
    • Line 9: warning: exported type Vec should have comment or be unexported (golint)
    • Line 14: warning: exported function NewVector should have comment or be unexported (golint)
    • Line 23: warning: exported method Vec.Enqueue should have comment or be unexported (golint)
    • Line 27: warning: exported method Vec.Dequeue should have comment or be unexported (golint)
    • Line 43: warning: exported method Vec.Destroy should have comment or be unexported (golint)
    • roadrunner/plugins/resetter/plugin.go
    • Line 9: warning: exported const PluginName should have comment or be unexported (golint)
    • Line 11: warning: exported type Plugin should have comment or be unexported (golint)
    • Line 16: warning: exported method Plugin.ResetAll should have comment or be unexported (golint)
    • Line 27: warning: exported method Plugin.ResetByName should have comment or be unexported (golint)
    • Line 35: warning: exported method Plugin.GetAll should have comment or be unexported (golint)
    • Line 43: warning: exported method Plugin.Init should have comment or be unexported (golint)
    • roadrunner/internal/protocol.go
    • Line 14: warning: exported type StopCommand should have comment or be unexported (golint)
    • Line 22: warning: exported function SendControl should have comment or be unexported (golint)
    • Line 62: warning: exported function FetchPID should have comment or be unexported (golint)
    • roadrunner/plugins/kv/storage.go
    • Line 12: warning: exported const PluginName should have comment or be unexported (golint)
    • Line 36: warning: exported method Plugin.Init should have comment or be unexported (golint)
    • Line 53: warning: exported method Plugin.Serve should have comment or be unexported (golint)
    • Line 163: warning: exported method Plugin.Stop should have comment or be unexported (golint)
    • Line 174: warning: exported method Plugin.GetAllStorageDrivers should have comment or be unexported (golint)
    • Line 184: warning: exported method Plugin.Name should have comment or be unexported (golint)
    • roadrunner/plugins/config/plugin.go
    • Line 13: warning: exported const PluginName should have comment or be unexported (golint)
    • Line 15: warning: exported type Viper should have comment or be unexported (golint)
    • Line 99: warning: exported method Viper.Unmarshal should have comment or be unexported (golint)
    • Line 123: warning: exported method Viper.Serve should have comment or be unexported (golint)
    • Line 127: warning: exported method Viper.Stop should have comment or be unexported (golint)
    • roadrunner/pkg/worker/state.go
    • Line 40: warning: exported type StateImpl should have comment or be unexported (golint)
    • Line 47: warning: comment on exported function NewWorkerState should be of the form "NewWorkerState ..." (golint)
    • Line 109: warning: exported method StateImpl.LastUsed should have comment or be unexported (golint)
    • roadrunner/tests/plugins/server/plugin_sockets.go
    • Line 14: warning: exported type Foo2 should have comment or be unexported (golint)
    • Line 20: warning: exported method Foo2.Init should have comment or be unexported (golint)
    • Line 26: warning: exported method Foo2.Serve should have comment or be unexported (golint)
    • Line 106: warning: exported method Foo2.Stop should have comment or be unexported (golint)
    • roadrunner/plugins/informer/plugin.go
    • Line 9: warning: exported const PluginName should have comment or be unexported (golint)
    • Line 11: warning: exported type Plugin should have comment or be unexported (golint)
    • Line 16: warning: exported method Plugin.Init should have comment or be unexported (golint)
    • roadrunner/plugins/kv/drivers/boltdb/driver.go
    • Line 19: warning: exported type Driver should have comment or be unexported (golint)
    • Line 35: warning: exported function NewBoltDBDriver should have comment or be unexported (golint)
    • Line 82: warning: exported method Driver.Has should have comment or be unexported (golint)
    • Line 163: warning: exported method Driver.MGet should have comment or be unexported (golint)
    • Line 343: warning: exported method Driver.TTL should have comment or be unexported (golint)
    • roadrunner/plugins/kv/drivers/memcached/plugin.go
    • Line 10: warning: exported const PluginName should have comment or be unexported (golint)
    • Line 12: warning: exported var EmptyItem should have comment or be unexported (golint)
    • Line 14: warning: exported type Plugin should have comment or be unexported (golint)
    • Line 21: warning: exported method Plugin.Init should have comment or be unexported (golint)
    • Line 39: warning: exported method Plugin.Provide should have comment or be unexported (golint)
    • roadrunner/pkg/worker/sync_worker.go
    • Line 18: warning: exported type SyncWorkerImpl should have comment or be unexported (golint)
    • Line 65: warning: comment on exported method SyncWorkerImpl.ExecWithTTL should be of the form "ExecWithTTL ..." (golint)
    • Line 194: warning: exported method SyncWorkerImpl.Pid should have comment or be unexported (golint)
    • Line 198: warning: exported method SyncWorkerImpl.Created should have comment or be unexported (golint)
    • Line 202: warning: exported method SyncWorkerImpl.State should have comment or be unexported (golint)
    • Line 206: warning: exported method SyncWorkerImpl.Start should have comment or be unexported (golint)
    • Line 210: warning: exported method SyncWorkerImpl.Wait should have comment or be unexported (golint)
    • Line 214: warning: exported method SyncWorkerImpl.Stop should have comment or be unexported (golint)
    • Line 218: warning: exported method SyncWorkerImpl.Kill should have comment or be unexported (golint)
    • Line 222: warning: exported method SyncWorkerImpl.Relay should have comment or be unexported (golint)
    • Line 226: warning: exported method SyncWorkerImpl.AttachRelay should have comment or be unexported (golint)
    • roadrunner/plugins/reload/watcher.go
    • Line 27: warning: exported type WatcherConfig should have comment or be unexported (golint)
    • Line 50: warning: exported type Watcher should have comment or be unexported (golint)
    • Line 192: warning: exported method Watcher.StartPolling should have comment or be unexported (golint)
    • Line 370: warning: exported method Watcher.Stop should have comment or be unexported (golint)
    • roadrunner/tests/plugins/informer/test_plugin.go
    • Line 27: warning: comment on exported type Plugin1 should be of the form "Plugin1 ..." (with optional leading article) (golint)
    • Line 33: warning: exported method Plugin1.Init should have comment or be unexported (golint)
    • Line 39: warning: exported method Plugin1.Serve should have comment or be unexported (golint)
    • Line 44: warning: exported method Plugin1.Stop should have comment or be unexported (golint)
    • Line 48: warning: exported method Plugin1.Name should have comment or be unexported (golint)
    • Line 52: warning: exported method Plugin1.Available should have comment or be unexported (golint)
    • Line 54: warning: exported method Plugin1.Workers should have comment or be unexported (golint)
    • roadrunner/tests/plugins/metrics/plugin1.go
    • Line 8: warning: comment on exported type Plugin1 should be of the form "Plugin1 ..." (with optional leading article) (golint)
    • Line 13: warning: exported method Plugin1.Init should have comment or be unexported (golint)
    • Line 18: warning: exported method Plugin1.Serve should have comment or be unexported (golint)
    • Line 23: warning: exported method Plugin1.Stop should have comment or be unexported (golint)
    • Line 27: warning: exported method Plugin1.Name should have comment or be unexported (golint)
    • Line 31: warning: exported method Plugin1.MetricsCollector should have comment or be unexported (golint)
    • roadrunner/plugins/redis/plugin.go
    • Line 10: warning: exported const PluginName should have comment or be unexported (golint)
    • Line 12: warning: exported type Plugin should have comment or be unexported (golint)
    • Line 21: warning: exported method Plugin.GetClient should have comment or be unexported (golint)
    • Line 25: warning: exported method Plugin.Init should have comment or be unexported (golint)
    • Line 67: warning: exported method Plugin.Serve should have comment or be unexported (golint)
    • Line 72: warning: exported method Plugin.Stop should have comment or be unexported (golint)
    • Line 76: warning: exported method Plugin.Name should have comment or be unexported (golint)
    • roadrunner/plugins/service/plugin.go
    • Line 12: warning: exported const PluginName should have comment or be unexported (golint)
    • Line 14: warning: exported type Plugin should have comment or be unexported (golint)
    • Line 24: warning: exported method Plugin.Init should have comment or be unexported (golint)
    • Line 42: warning: exported method Plugin.Serve should have comment or be unexported (golint)
    • Line 77: warning: exported method Plugin.Workers should have comment or be unexported (golint)
    • Line 91: warning: exported method Plugin.Stop should have comment or be unexported (golint)
    • roadrunner/tests/plugins/config/plugin2.go
    • Line 8: warning: exported type Foo2 should have comment or be unexported (golint)
    • Line 12: warning: comment on exported method Foo2.Init should be of the form "Init ..." (golint)
    • Line 18: warning: exported method Foo2.Serve should have comment or be unexported (golint)
    • Line 48: warning: exported method Foo2.Stop should have comment or be unexported (golint)
    • roadrunner/tests/plugins/config/plugin3.go
    • Line 10: warning: exported type Foo3 should have comment or be unexported (golint)
    • Line 14: warning: comment on exported method Foo3.Init should be of the form "Init ..." (golint)
    • Line 20: warning: exported method Foo3.Serve should have comment or be unexported (golint)
    • Line 32: warning: exported method Foo3.Stop should have comment or be unexported (golint)
    • roadrunner/tests/plugins/rpc/plugin1.go
    • Line 9: warning: exported type Plugin1 should have comment or be unexported (golint)
    • Line 13: warning: exported method Plugin1.Init should have comment or be unexported (golint)
    • Line 18: warning: exported method Plugin1.Serve should have comment or be unexported (golint)
    • Line 23: warning: exported method Plugin1.Stop should have comment or be unexported (golint)
    • Line 27: warning: exported method Plugin1.Name should have comment or be unexported (golint)
    • Line 31: warning: exported method Plugin1.RPC should have comment or be unexported (golint)
    • Line 35: warning: exported type PluginRPC should have comment or be unexported (golint)
    • Line 39: warning: exported method PluginRPC.Hello should have comment or be unexported (golint)
    • roadrunner/plugins/kv/drivers/redis/plugin.go
    • Line 10: warning: exported const PluginName should have comment or be unexported (golint)
    • Line 19: warning: exported method Plugin.Init should have comment or be unexported (golint)
    • Line 34: warning: exported method Plugin.Stop should have comment or be unexported (golint)
    • Line 38: warning: exported method Plugin.Provide should have comment or be unexported (golint)
    • roadrunner/pkg/worker/worker.go
    • Line 18: warning: exported type Options should have comment or be unexported (golint)
    • Line 70: warning: exported function AddListeners should have comment or be unexported (golint)
    • Line 125: warning: exported method Process.Start should have comment or be unexported (golint)
    • roadrunner/plugins/kv/drivers/boltdb/plugin.go
    • Line 10: warning: exported const PluginName should have comment or be unexported (golint)
    • Line 23: warning: exported method Plugin.Init should have comment or be unexported (golint)
    • Line 39: warning: exported method Plugin.Stop should have comment or be unexported (golint)
    • Line 49: warning: exported method Plugin.Provide should have comment or be unexported (golint)
    • roadrunner/tests/plugins/server/plugin_pipes.go
    • Line 15: warning: exported const ConfigSection should have comment or be unexported (golint)
    • Line 16: warning: exported const Response should have comment or be unexported (golint)
    • Line 32: warning: exported type Foo should have comment or be unexported (golint)
    • Line 38: warning: exported method Foo.Init should have comment or be unexported (golint)
    • Line 44: warning: exported method Foo.Serve should have comment or be unexported (golint)
    • Line 125: warning: exported method Foo.Stop should have comment or be unexported (golint)
    • roadrunner/plugins/logger/zap_adapter.go
    • Line 9: warning: exported type ZapAdapter should have comment or be unexported (golint)
    • Line 13: warning: comment on exported function NewZapAdapter should be of the form "NewZapAdapter ..." (golint)
    • Line 38: warning: exported method ZapAdapter.Debug should have comment or be unexported (golint)
    • Line 42: warning: exported method ZapAdapter.Info should have comment or be unexported (golint)
    • Line 46: warning: exported method ZapAdapter.Warn should have comment or be unexported (golint)
    • Line 54: warning: exported method ZapAdapter.With should have comment or be unexported (golint)
    • roadrunner/plugins/reload/plugin.go
    • Line 18: warning: exported type Plugin should have comment or be unexported (golint)
    • Line 80: warning: exported method Plugin.Serve should have comment or be unexported (golint)
    • Line 155: warning: exported method Plugin.Stop should have comment or be unexported (golint)
    • Line 161: warning: exported method Plugin.Name should have comment or be unexported (golint)
    • roadrunner/tests/plugins/redis/plugin1.go
    • Line 12: warning: exported type Plugin1 should have comment or be unexported (golint)
    • Line 16: warning: exported method Plugin1.Init should have comment or be unexported (golint)
    • Line 21: warning: exported method Plugin1.Serve should have comment or be unexported (golint)
    • Line 41: warning: exported method Plugin1.Stop should have comment or be unexported (golint)
    • roadrunner/tests/plugins/resetter/test_plugin.go
    • Line 26: warning: comment on exported type Plugin1 should be of the form "Plugin1 ..." (with optional leading article) (golint)
    • Line 32: warning: exported method Plugin1.Init should have comment or be unexported (golint)
    • Line 38: warning: exported method Plugin1.Serve should have comment or be unexported (golint)
    • Line 43: warning: exported method Plugin1.Stop should have comment or be unexported (golint)
    • Line 47: warning: exported method Plugin1.Name should have comment or be unexported (golint)
    • Line 51: warning: exported method Plugin1.Reset should have comment or be unexported (golint)
    • roadrunner/tests/plugins/rpc/plugin2.go
    • Line 12: warning: comment on exported type Plugin2 should be of the form "Plugin2 ..." (with optional leading article) (golint)
    • Line 18: warning: exported method Plugin2.Init should have comment or be unexported (golint)
    • Line 22: warning: exported method Plugin2.Serve should have comment or be unexported (golint)
    • Line 51: warning: exported method Plugin2.Stop should have comment or be unexported (golint)
    • roadrunner/plugins/gzip/plugin.go
    • Line 9: warning: exported const PluginName should have comment or be unexported (golint)
    • Line 11: warning: exported type Plugin should have comment or be unexported (golint)
    • Line 18: warning: exported method Plugin.Middleware should have comment or be unexported (golint)
    • Line 27: warning: exported method Plugin.Name should have comment or be unexported (golint)
    • roadrunner/plugins/kv/drivers/memory/driver.go
    • Line 14: warning: exported type Driver should have comment or be unexported (golint)
    • Line 22: warning: exported function NewInMemoryDriver should have comment or be unexported (golint)
    • Line 42: warning: exported method Driver.Has should have comment or be unexported (golint)
    • Line 62: warning: exported method Driver.Get should have comment or be unexported (golint)
    • Line 78: warning: exported method Driver.MGet should have comment or be unexported (golint)
    • Line 103: warning: exported method Driver.Set should have comment or be unexported (golint)
    • Line 155: warning: exported method Driver.TTL should have comment or be unexported (golint)
    • Line 179: warning: exported method Driver.Delete should have comment or be unexported (golint)
    • roadrunner/tests/plugins/server/plugin_tcp.go
    • Line 14: warning: exported type Foo3 should have comment or be unexported (golint)
    • Line 20: warning: exported method Foo3.Init should have comment or be unexported (golint)
    • Line 26: warning: exported method Foo3.Serve should have comment or be unexported (golint)
    • Line 106: warning: exported method Foo3.Stop should have comment or be unexported (golint)
    • roadrunner/plugins/status/plugin.go
    • Line 20: warning: exported type Plugin should have comment or be unexported (golint)
    • Line 30: warning: exported method Plugin.Init should have comment or be unexported (golint)
    • Line 51: warning: exported method Plugin.Serve should have comment or be unexported (golint)
    • Line 73: warning: exported method Plugin.Stop should have comment or be unexported (golint)
    • Line 138: warning: exported type Plugins should have comment or be unexported (golint)
    • roadrunner/tests/plugins/logger/plugin.go
    • Line 11: warning: exported type Plugin should have comment or be unexported (golint)
    • Line 16: warning: exported method Plugin.Init should have comment or be unexported (golint)
    • Line 22: warning: exported method Plugin.Serve should have comment or be unexported (golint)
    • Line 41: warning: exported method Plugin.Stop should have comment or be unexported (golint)
    • Line 45: warning: exported method Plugin.Name should have comment or be unexported (golint)
    • roadrunner/tests/plugins/config/plugin1.go
    • Line 10: warning: exported type AllConfig should have comment or be unexported (golint)
    • Line 46: warning: exported type ServiceConfig should have comment or be unexported (golint)
    • Line 54: warning: exported type Foo should have comment or be unexported (golint)
    • Line 58: warning: comment on exported method Foo.Init should be of the form "Init ..." (golint)
    • Line 64: warning: exported method Foo.Serve should have comment or be unexported (golint)
    • Line 94: warning: exported method Foo.Stop should have comment or be unexported (golint)
    • roadrunner/pkg/pool/config.go
    • Line 8: warning: comment on exported type Config should be of the form "Config ..." (with optional leading article) (golint)
    • Line 53: warning: exported type SupervisorConfig should have comment or be unexported (golint)
    • roadrunner/plugins/kv/drivers/memory/plugin.go
    • Line 13: warning: exported type Plugin should have comment or be unexported (golint)
    • Line 22: warning: exported method Plugin.Init should have comment or be unexported (golint)
    • Line 34: warning: exported method Plugin.Serve should have comment or be unexported (golint)
    • Line 38: warning: exported method Plugin.Stop should have comment or be unexported (golint)
    • Line 48: warning: exported method Plugin.Provide should have comment or be unexported (golint)
    • roadrunner/tests/plugins/http/plugin1.go
    • Line 7: warning: exported type Plugin1 should have comment or be unexported (golint)
    • Line 11: warning: exported method Plugin1.Init should have comment or be unexported (golint)
    • Line 16: warning: exported method Plugin1.Serve should have comment or be unexported (golint)
    • Line 21: warning: exported method Plugin1.Stop should have comment or be unexported (golint)
    • Line 25: warning: exported method Plugin1.Name should have comment or be unexported (golint)
    • roadrunner/pkg/pool/static_pool.go
    • Line 23: warning: exported type Options should have comment or be unexported (golint)
    • Line 25: warning: exported type Command should have comment or be unexported (golint)
    • Line 50: warning: don't use underscores in Go names; struct field err_encoder should be errEncoder (golint)
    • Line 108: warning: exported function AddListeners should have comment or be unexported (golint)
    • Line 132: warning: exported method StaticPool.RemoveWorker 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!