Preparing report...

Report for github.com/BotBotMe/botbot-bot

A    Great!    Found 12 issues across 16 files

Tweet

gofmt87%

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!


gocyclo93%

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.

    • botbot-bot/network/irc/irc.go
    • Line 594: warning: cyclomatic complexity 27 of function (*ircBot).act() is high (> 15) (gocyclo)
    • Line 754: warning: cyclomatic complexity 18 of function parseLine() is high (> 15) (gocyclo)
    • Line 157: warning: cyclomatic complexity 17 of function (*ircBot).listenSendMonitor() is high (> 15) (gocyclo)

golint37%

Golint is a linter for Go source code.

    • botbot-bot/common/storage.go
    • Line 12: warning: comment on exported type Storage should be of the form "Storage ..." (with optional leading article) (golint)
    • Line 22: warning: comment on exported type MockStorage should be of the form "MockStorage ..." (with optional leading article) (golint)
    • Line 27: warning: exported function NewMockStorage should have comment or be unexported (golint)
    • Line 40: warning: exported method MockStorage.BotConfig should have comment or be unexported (golint)
    • Line 44: warning: exported method MockStorage.SetCount should have comment or be unexported (golint)
    • Line 52: warning: exported type PostgresStorage should have comment or be unexported (golint)
    • Line 56: warning: comment on exported function NewPostgresStorage should be of the form "NewPostgresStorage ..." (golint)
    • Line 83: warning: exported method PostgresStorage.BotConfig should have comment or be unexported (golint)
    • Line 98: warning: don't use underscores in Go names; var server_password should be serverPassword (golint)
    • Line 98: warning: don't use underscores in Go names; var real_name should be realName (golint)
    • Line 98: warning: don't use underscores in Go names; var server_identifier should be serverIdentifier (golint)
    • Line 151: warning: exported method PostgresStorage.SetCount should have comment or be unexported (golint)
    • Line 151: warning: receiver name ms should be consistent with previous receiver name ps for PostgresStorage (golint)
    • Line 200: warning: receiver name ms should be consistent with previous receiver name ps for PostgresStorage (golint)
    • Line 222: warning: exported method PostgresStorage.Close should have comment or be unexported (golint)
    • Line 222: warning: receiver name ms should be consistent with previous receiver name ps for PostgresStorage (golint)
    • botbot-bot/dispatch/dispatch.go
    • Line 11: warning: comment on exported const QUEUE_PREFIX should be of the form "QUEUE_PREFIX ..." (golint)
    • Line 13: warning: exported const MAX_QUEUE_SIZE should have comment (or a comment on this block) or be unexported (golint)
    • Line 16: warning: exported type Dispatcher should have comment or be unexported (golint)
    • Line 20: warning: exported function NewDispatcher should have comment or be unexported (golint)
    • Line 26: warning: comment on exported method Dispatcher.Dispatch should be of the form "Dispatch ..." (golint)
    • Line 55: warning: comment on exported method Dispatcher.DispatchMany should be of the form "DispatchMany ..." (golint)
    • botbot-bot/user/user.go
    • Line 12: warning: exported type UserManager should have comment or be unexported (golint)
    • Line 21: warning: exported function NewUserManager should have comment or be unexported (golint)
    • Line 29: warning: comment on exported method UserManager.Act should be of the form "Act ..." (golint)
    • Line 59: warning: comment on exported method UserManager.Count should be of the form "Count ..." (golint)
    • Line 69: warning: comment on exported method UserManager.In should be of the form "In ..." (golint)
    • Line 85: warning: comment on exported method UserManager.Channels should be of the form "Channels ..." (golint)
    • botbot-bot/network/network.go
    • Line 15: warning: exported type NetworkManager should have comment or be unexported (golint)
    • Line 23: warning: exported function NewNetworkManager should have comment or be unexported (golint)
    • Line 35: warning: exported method NetworkManager.IsRunning should have comment or be unexported (golint)
    • Line 41: warning: comment on exported method NetworkManager.GetUserByChatbotId should be of the form "GetUserByChatbotId ..." (golint)
    • Line 46: warning: comment on exported method NetworkManager.RefreshChatbots should be of the form "RefreshChatbots ..." (golint)
    • Line 103: warning: exported method NetworkManager.Connect should have comment or be unexported (golint)
    • Line 109: warning: exported method NetworkManager.Send should have comment or be unexported (golint)
    • Line 115: warning: comment on exported method NetworkManager.MonitorChatbots should be of the form "MonitorChatbots ..." (golint)
    • Line 162: warning: comment on exported method NetworkManager.Shutdown should be of the form "Shutdown ..." (golint)
    • botbot-bot/common/common.go
    • Line 8: warning: comment on exported type ChatBot should be of the form "ChatBot ..." (with optional leading article) (golint)
    • Line 17: warning: comment on exported type BotConfig should be of the form "BotConfig ..." (with optional leading article) (golint)
    • Line 24: warning: comment on exported type Channel should be of the form "Channel ..." (with optional leading article) (golint)
    • Line 32: warning: exported method Channel.Credential should have comment or be unexported (golint)
    • botbot-bot/common/queue.go
    • Line 16: warning: comment on exported type Queue should be of the form "Queue ..." (with optional leading article) (golint)
    • Line 45: warning: comment on exported type MockQueue should be of the form "MockQueue ..." (with optional leading article) (golint)
    • Line 52: warning: exported function NewMockQueue should have comment or be unexported (golint)
    • Line 59: warning: exported method MockQueue.Publish should have comment or be unexported (golint)
    • Line 66: warning: exported method MockQueue.Rpush should have comment or be unexported (golint)
    • Line 73: warning: exported method MockQueue.Lpush should have comment or be unexported (golint)
    • Line 81: warning: exported method MockQueue.Blpop should have comment or be unexported (golint)
    • Line 86: warning: exported method MockQueue.Llen should have comment or be unexported (golint)
    • Line 92: warning: exported method MockQueue.Ltrim should have comment or be unexported (golint)
    • Line 96: warning: exported method MockQueue.Ping should have comment or be unexported (golint)
    • Line 100: warning: comment on exported type RedisQueue should be of the form "RedisQueue ..." (with optional leading article) (golint)
    • Line 109: warning: exported function NewRedisQueue should have comment or be unexported (golint)
    • Line 141: warning: exported method RedisQueue.Publish should have comment or be unexported (golint)
    • Line 157: warning: exported method RedisQueue.Blpop should have comment or be unexported (golint)
    • Line 173: warning: exported method RedisQueue.Rpush should have comment or be unexported (golint)
    • Line 189: warning: exported method RedisQueue.Lpush should have comment or be unexported (golint)
    • Line 205: warning: exported method RedisQueue.Llen should have comment or be unexported (golint)
    • Line 221: warning: exported method RedisQueue.Ltrim should have comment or be unexported (golint)
    • Line 237: warning: exported method RedisQueue.Ping should have comment or be unexported (golint)
    • botbot-bot/botbot.go
    • Line 21: warning: exported type BotBot should have comment or be unexported (golint)
    • Line 31: warning: exported function NewBotBot should have comment or be unexported (golint)
    • botbot-bot/main.go
    • Line 19: warning: comment on exported const LISTEN_QUEUE_PREFIX should be of the form "LISTEN_QUEUE_PREFIX ..." (golint)
    • botbot-bot/common/mock.go
    • Line 48: warning: exported method MockSocket.Close should have comment or be unexported (golint)
    • Line 62: warning: exported type MockIRCServer should have comment or be unexported (golint)
    • Line 69: warning: exported function NewMockIRCServer should have comment or be unexported (golint)
    • Line 77: warning: exported method MockIRCServer.GotLength should have comment or be unexported (golint)
    • Line 83: warning: exported method MockIRCServer.Run should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign43%

IneffAssign detects ineffectual assignments in Go code.

    • botbot-bot/botbot.go
    • Line 10: warning: cannot find package "." in: (ineffassign)
    • Line 11: warning: cannot find package "." in: (ineffassign)
    • Line 12: warning: cannot find package "." in: (ineffassign)
    • Line 13: warning: cannot find package "." in: (ineffassign)
    • Line 14: warning: cannot find package "." in: (ineffassign)
    • Line 8: warning: cannot find package "." in: (ineffassign)
    • Line 8: warning: could not import github.com/golang/glog (invalid package name: "") (ineffassign)
    • Line 10: warning: could not import github.com/BotBotMe/botbot-bot/common (invalid package name: "") (ineffassign)
    • Line 11: warning: could not import github.com/BotBotMe/botbot-bot/dispatch (invalid package name: "") (ineffassign)
    • Line 12: warning: could not import github.com/BotBotMe/botbot-bot/line (invalid package name: "") (ineffassign)
    • Line 13: warning: could not import github.com/BotBotMe/botbot-bot/network (invalid package name: "") (ineffassign)
    • Line 14: warning: could not import github.com/BotBotMe/botbot-bot/user (invalid package name: "") (ineffassign)
    • Line 8: warning: could not import github.com/golang/glog (invalid package name: "") (ineffassign)
    • Line 10: warning: could not import github.com/BotBotMe/botbot-bot/common (invalid package name: "") (ineffassign)
    • Line 11: warning: could not import github.com/BotBotMe/botbot-bot/dispatch (invalid package name: "") (ineffassign)
    • Line 12: warning: could not import github.com/BotBotMe/botbot-bot/line (invalid package name: "") (ineffassign)
    • Line 13: warning: could not import github.com/BotBotMe/botbot-bot/network (invalid package name: "") (ineffassign)
    • Line 14: warning: could not import github.com/BotBotMe/botbot-bot/user (invalid package name: "") (ineffassign)
    • botbot-bot/dispatch/dispatch.go
    • Line 6: warning: cannot find package "." in: (ineffassign)
    • Line 7: warning: cannot find package "." in: (ineffassign)
    • Line 4: warning: cannot find package "." in: (ineffassign)
    • Line 4: warning: could not import github.com/golang/glog (invalid package name: "") (ineffassign)
    • Line 6: warning: could not import github.com/BotBotMe/botbot-bot/common (invalid package name: "") (ineffassign)
    • Line 7: warning: could not import github.com/BotBotMe/botbot-bot/line (invalid package name: "") (ineffassign)
    • Line 4: warning: could not import github.com/golang/glog (invalid package name: "") (ineffassign)
    • Line 6: warning: could not import github.com/BotBotMe/botbot-bot/common (invalid package name: "") (ineffassign)
    • Line 7: warning: could not import github.com/BotBotMe/botbot-bot/line (invalid package name: "") (ineffassign)
    • botbot-bot/network/network.go
    • Line 10: warning: cannot find package "." in: (ineffassign)
    • Line 11: warning: cannot find package "." in: (ineffassign)
    • Line 12: warning: cannot find package "." in: (ineffassign)
    • Line 8: warning: cannot find package "." in: (ineffassign)
    • Line 8: warning: could not import github.com/golang/glog (invalid package name: "") (ineffassign)
    • Line 10: warning: could not import github.com/BotBotMe/botbot-bot/common (invalid package name: "") (ineffassign)
    • Line 11: warning: could not import github.com/BotBotMe/botbot-bot/line (invalid package name: "") (ineffassign)
    • Line 12: warning: could not import github.com/BotBotMe/botbot-bot/network/irc (invalid package name: "") (ineffassign)
    • botbot-bot/line/line.go
    • Line 7: warning: cannot find package "." in: (ineffassign)
    • Line 7: warning: could not import github.com/golang/glog (invalid package name: "") (ineffassign)
    • Line 7: warning: could not import github.com/golang/glog (invalid package name: "") (ineffassign)
    • botbot-bot/network/irc/irc.go
    • Line 29: warning: cannot find package "." in: (ineffassign)
    • Line 30: warning: cannot find package "." in: (ineffassign)
    • Line 27: warning: cannot find package "." in: (ineffassign)
    • Line 27: warning: could not import github.com/golang/glog (invalid package name: "") (ineffassign)
    • Line 29: warning: could not import github.com/BotBotMe/botbot-bot/common (invalid package name: "") (ineffassign)
    • Line 30: warning: could not import github.com/BotBotMe/botbot-bot/line (invalid package name: "") (ineffassign)
    • Line 27: warning: could not import github.com/golang/glog (invalid package name: "") (ineffassign)
    • Line 29: warning: could not import github.com/BotBotMe/botbot-bot/common (invalid package name: "") (ineffassign)
    • Line 30: warning: could not import github.com/BotBotMe/botbot-bot/line (invalid package name: "") (ineffassign)
    • botbot-bot/user/user.go
    • Line 4: warning: cannot find package "." in: (ineffassign)
    • Line 4: warning: could not import github.com/BotBotMe/botbot-bot/line (invalid package name: "") (ineffassign)
    • Line 4: warning: could not import github.com/BotBotMe/botbot-bot/line (invalid package name: "") (ineffassign)

misspell81%

Misspell Finds commonly misspelled English words

    • botbot-bot/network/irc/irc.go
    • Line 177: warning: "occured" is a misspelling of "occurred" (misspell)
    • Line 264: warning: "occured" is a misspelling of "occurred" (misspell)
    • Line 414: warning: "occured" is a misspelling of "occurred" (misspell)
    • Line 576: warning: "occured" is a misspelling of "occurred" (misspell)