Preparing report...

Report for github.com/everpcpc/channels

A+    Excellent!    Found 23 issues across 43 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.


golint51%

Golint is a linter for Go source code.

    • channels/state/state.go
    • Line 77: warning: exported function New should have comment or be unexported (golint)
    • Line 219: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 222: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 231: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • channels/slack/info.go
    • Line 15: warning: exported method Client.GetUserName should have comment or be unexported (golint)
    • Line 27: warning: exported method Client.GetChannelName should have comment or be unexported (golint)
    • Line 37: warning: exported method Client.TranslateMentions should have comment or be unexported (golint)
    • channels/slack/slack.go
    • Line 20: warning: exported type Conversation should have comment or be unexported (golint)
    • Line 25: warning: exported type Config should have comment or be unexported (golint)
    • Line 37: warning: exported type Client should have comment or be unexported (golint)
    • Line 51: warning: exported function NewClient should have comment or be unexported (golint)
    • Line 81: warning: exported method Client.Run should have comment or be unexported (golint)
    • channels/storage/message.go
    • Line 6: warning: exported const MessageSourceSlack should have comment (or a comment on this block) or be unexported (golint)
    • Line 11: warning: exported type Message should have comment or be unexported (golint)
    • Line 26: warning: exported method Message.GetTarget should have comment or be unexported (golint)
    • channels/storage/redis.go
    • Line 11: warning: exported type RedisConfig should have comment or be unexported (golint)
    • Line 18: warning: exported function NewRedisBackend should have comment or be unexported (golint)
    • Line 36: warning: exported type BackendRedis should have comment or be unexported (golint)
    • Line 41: warning: exported method BackendRedis.Save should have comment or be unexported (golint)
    • Line 51: warning: exported method BackendRedis.PullLoop should have comment or be unexported (golint)
    • Line 86: warning: exported method BackendRedis.Subscribe should have comment or be unexported (golint)
    • Line 90: warning: exported method BackendRedis.UnSubscribe should have comment or be unexported (golint)
    • Line 94: warning: exported method BackendRedis.Get should have comment or be unexported (golint)
    • Line 98: warning: exported method BackendRedis.Set should have comment or be unexported (golint)
    • Line 106: warning: exported method BackendRedis.GetToken should have comment or be unexported (golint)
    • Line 117: warning: exported method BackendRedis.AddToken should have comment or be unexported (golint)
    • Line 129: warning: exported method BackendRedis.DeleteTokens should have comment or be unexported (golint)
    • Line 139: warning: exported method BackendRedis.ListTokens should have comment or be unexported (golint)
    • channels/irc/capbilities.go
    • Line 14: warning: exported const CapMsgTagPrefix should have comment (or a comment on this block) or be unexported (golint)
    • Line 47: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 57: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 96: warning: exported function GetServerCaps should have comment or be unexported (golint)
    • Line 110: warning: exported var ServerCapsLsResp should have comment or be unexported (golint)
    • channels/irc/message.go
    • Line 22: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • channels/web/server.go
    • Line 13: warning: exported type Config should have comment or be unexported (golint)
    • Line 19: warning: exported type Server should have comment or be unexported (golint)
    • Line 26: warning: exported function NewServer should have comment or be unexported (golint)
    • Line 50: warning: exported method Server.WithWebhook should have comment or be unexported (golint)
    • Line 65: warning: exported method Server.WithSlack should have comment or be unexported (golint)
    • Line 70: warning: exported method Server.Run should have comment or be unexported (golint)
    • channels/state/user.go
    • Line 10: warning: exported type Capbilities should have comment or be unexported (golint)
    • Line 12: warning: exported type User should have comment or be unexported (golint)
    • Line 25: warning: exported method User.GetName should have comment or be unexported (golint)
    • Line 29: warning: exported method User.AddRoles should have comment or be unexported (golint)
    • Line 33: warning: exported method User.GetChannels should have comment or be unexported (golint)
    • Line 41: warning: exported method User.SetSendFn should have comment or be unexported (golint)
    • Line 53: warning: comment on exported method User.AddCap should be of the form "AddCap ..." (golint)
    • Line 59: warning: exported method User.GetCaps should have comment or be unexported (golint)
    • channels/storage/cache.go
    • Line 3: warning: exported type CacheBackend should have comment or be unexported (golint)
    • Line 8: warning: exported function Cached should have comment or be unexported (golint)
    • channels/state/channel.go
    • Line 9: warning: exported type Channel should have comment or be unexported (golint)
    • Line 21: warning: exported method Channel.GetName should have comment or be unexported (golint)
    • Line 25: warning: exported method Channel.SetSendFn should have comment or be unexported (golint)
    • Line 29: warning: exported method Channel.SendUsers should have comment or be unexported (golint)
    • Line 35: warning: exported method Channel.HasUser should have comment or be unexported (golint)
    • channels/storage/token.go
    • Line 8: warning: exported type TokenBackend should have comment or be unexported (golint)
    • Line 15: warning: exported type TokenData should have comment or be unexported (golint)
    • channels/irc/handler.go
    • Line 18: warning: receiver name should not be an underscore, omit the name if it is unused (golint)
    • Line 22: warning: receiver name should not be an underscore, omit the name if it is unused (golint)
    • Line 35: warning: receiver name should not be an underscore, omit the name if it is unused (golint)
    • channels/irc/handler_fresh.go
    • Line 41: warning: receiver name should not be an underscore, omit the name if it is unused (golint)
    • Line 137: warning: should omit 2nd value from range; this loop is equivalent to `for c := range ...` (golint)
    • channels/irc/sink.go
    • Line 12: warning: exported const MaxMessageLength should have comment (or a comment on this block) or be unexported (golint)
    • Line 65: warning: should omit 2nd value from range; this loop is equivalent to `for c := range ...` (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!