Preparing report...

Report for github.com/mumble-voip/grumble

A    Great!    Found 31 issues across 56 files

Tweet

gofmt89%

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!


golint48%

Golint is a linter for Go source code.

    • grumble/pkg/sessionpool/sessionpool.go
    • Line 22: warning: comment on exported function New should be of the form "New ..." (golint)
    • Line 28: warning: comment on exported method SessionPool.EnableUseTracking should be of the form "EnableUseTracking ..." (golint)
    • grumble/pkg/packetdata/packetdata.go
    • Line 12: warning: exported type PacketData should have comment or be unexported (golint)
    • Line 20: warning: exported function New should have comment or be unexported (golint)
    • Line 28: warning: exported method PacketData.IsValid should have comment or be unexported (golint)
    • Line 32: warning: exported method PacketData.Skip should have comment or be unexported (golint)
    • Line 58: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 70: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 302: warning: comment on exported method PacketData.CopyBytes should be of the form "CopyBytes ..." (golint)
    • Line 313: warning: comment on exported method PacketData.PutBytes should be of the form "PutBytes ..." (golint)
    • grumble/cmd/grumble/client.go
    • Line 26: warning: comment on exported type Client should be of the form "Client ..." (with optional leading article) (golint)
    • Line 118: warning: exported method Client.ACLContext should have comment or be unexported (golint)
    • Line 122: warning: exported method Client.CertHash should have comment or be unexported (golint)
    • Line 126: warning: exported method Client.Session should have comment or be unexported (golint)
    • Line 130: warning: exported method Client.Tokens should have comment or be unexported (golint)
    • Line 162: warning: comment on exported method Client.Panic should be of the form "Panic ..." (golint)
    • Line 168: warning: comment on exported method Client.Panicf should be of the form "Panicf ..." (golint)
    • Line 206: warning: comment on exported method Client.ForceDisconnect should be of the form "ForceDisconnect ..." (golint)
    • Line 218: warning: comment on exported method Client.RejectAuth should be of the form "RejectAuth ..." (golint)
    • Line 268: warning: receiver name c should be consistent with previous receiver name client for Client (golint)
    • Line 273: warning: receiver name c should be consistent with previous receiver name client for Client (golint)
    • Line 288: warning: receiver name c should be consistent with previous receiver name client for Client (golint)
    • Line 387: warning: comment on exported method Client.SendUDP should be of the form "SendUDP ..." (golint)
    • Line 395: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 619: warning: should omit 2nd value from range; this loop is equivalent to `for cid := range ...` (golint)
    • grumble/cmd/grumble/voicetarget.go
    • Line 26: warning: comment on exported method VoiceTarget.AddSession should be of the form "AddSession ..." (golint)
    • Line 56: warning: comment on exported method VoiceTarget.SendVoiceBroadcast should be of the form "SendVoiceBroadcast ..." (golint)
    • grumble/pkg/freezer/walker.go
    • Line 26: warning: comment on exported type Walker should be of the form "Walker ..." (with optional leading article) (golint)
    • Line 82: warning: comment on exported function NewReaderWalker should be of the form "NewReaderWalker ..." (golint)
    • grumble/cmd/grumble/message.go
    • Line 21: warning: exported type Message should have comment or be unexported (golint)
    • Line 27: warning: exported type VoiceBroadcast should have comment or be unexported (golint)
    • Line 1132: warning: should omit 2nd value from range; this loop is equivalent to `for uid := range ...` (golint)
    • Line 1136: warning: should omit 2nd value from range; this loop is equivalent to `for uid := range ...` (golint)
    • Line 1140: warning: should omit 2nd value from range; this loop is equivalent to `for uid := range ...` (golint)
    • Line 1145: warning: should omit 2nd value from range; this loop is equivalent to `for uid := range ...` (golint)
    • Line 1161: warning: should omit 2nd value from range; this loop is equivalent to `for uid := range ...` (golint)
    • grumble/cmd/grumble/args.go
    • Line 11: warning: exported type UsageArgs should have comment or be unexported (golint)
    • Line 70: warning: exported function Usage should have comment or be unexported (golint)
    • Line 88: warning: exported var Args should have comment or be unexported (golint)
    • grumble/pkg/acl/acl.go
    • Line 8: warning: comment on exported const NonePermission should be of the form "NonePermission ..." (golint)
    • Line 10: warning: exported const WritePermission should have comment (or a comment on this block) or be unexported (golint)
    • Line 22: warning: comment on exported const KickPermission should be of the form "KickPermission ..." (golint)
    • Line 28: warning: comment on exported const CachedPermission should be of the form "CachedPermission ..." (golint)
    • Line 164: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • grumble/cmd/grumble/register.go
    • Line 19: warning: exported type Register should have comment or be unexported (golint)
    • Line 36: warning: comment on exported method Server.IsPublic should be of the form "IsPublic ..." (golint)
    • Line 57: warning: comment on exported method Server.RegisterPublicServer should be of the form "RegisterPublicServer ..." (golint)
    • grumble/cmd/grumble/murmurdb.go
    • Line 26: warning: exported const ChannelInfoDescription should have comment (or a comment on this block) or be unexported (golint)
    • Line 31: warning: exported const UserInfoName should have comment (or a comment on this block) or be unexported (golint)
    • Line 39: warning: exported const SQLiteSupport should have comment or be unexported (golint)
    • Line 41: warning: comment on exported function MurmurImport should be of the form "MurmurImport ..." (golint)
    • Line 87: warning: comment on exported function NewServerFromSQLite should be of the form "NewServerFromSQLite ..." (golint)
    • Line 348: warning: should omit 2nd value from range; this loop is equivalent to `for id := range ...` (golint)
    • grumble/pkg/ban/ban.go
    • Line 13: warning: exported const ISODate should have comment (or a comment on this block) or be unexported (golint)
    • Line 16: warning: exported type Ban should have comment or be unexported (golint)
    • Line 26: warning: comment on exported method Ban.IPMask should be of the form "IPMask ..." (golint)
    • Line 51: warning: comment on exported method Ban.SetISOStartDate should be of the form "SetISOStartDate ..." (golint)
    • grumble/pkg/web/wslisten.go
    • Line 26: warning: exported type Listener should have comment or be unexported (golint)
    • Line 34: warning: exported function NewListener should have comment or be unexported (golint)
    • Line 43: warning: exported method Listener.Accept should have comment or be unexported (golint)
    • Line 55: warning: exported method Listener.Close should have comment or be unexported (golint)
    • Line 63: warning: exported method Listener.Addr should have comment or be unexported (golint)
    • grumble/cmd/grumble/channel.go
    • Line 13: warning: comment on exported type Channel should be of the form "Channel ..." (with optional leading article) (golint)
    • Line 34: warning: exported function NewChannel should have comment or be unexported (golint)
    • grumble/pkg/mumbleproto/types.go
    • Line 8: warning: exported const MessageVersion should have comment (or a comment on this block) or be unexported (golint)
    • Line 36: warning: exported const UDPMessageVoiceCELTAlpha should have comment (or a comment on this block) or be unexported (golint)
    • grumble/cmd/grumble/server.go
    • Line 39: warning: comment on exported const DefaultPort should be of the form "DefaultPort ..." (golint)
    • Line 41: warning: exported const DefaultWebPort should have comment or be unexported (golint)
    • Line 42: warning: exported const UDPPacketSize should have comment or be unexported (golint)
    • Line 44: warning: exported const LogOpsBeforeSync should have comment or be unexported (golint)
    • Line 45: warning: exported const CeltCompatBitstream should have comment or be unexported (golint)
    • Line 47: warning: exported const StateClientConnected should have comment (or a comment on this block) or be unexported (golint)
    • Line 55: warning: exported type KeyValuePair should have comment or be unexported (golint)
    • Line 61: warning: comment on exported type Server should be of the form "Server ..." (with optional leading article) (golint)
    • Line 140: warning: comment on exported function NewServer should be of the form "NewServer ..." (golint)
    • Line 383: warning: comment on exported method Server.LinkChannels should be of the form "LinkChannels ..." (golint)
    • Line 389: warning: comment on exported method Server.UnlinkChannels should be of the form "UnlinkChannels ..." (golint)
    • Line 508: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 912: warning: exported type ClientPredicate should have comment or be unexported (golint)
    • Line 975: warning: comment on exported method Server.SendUDP should be of the form "SendUDP ..." (golint)
    • Line 976: warning: receiver name s should be consistent with previous receiver name server for Server (golint)
    • Line 1060: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 1120: warning: comment on exported method Server.RegisterClient should be of the form "RegisterClient ..." (golint)
    • Line 1121: warning: receiver name s should be consistent with previous receiver name server for Server (golint)
    • Line 1151: warning: receiver name s should be consistent with previous receiver name server for Server (golint)
    • Line 1169: warning: receiver name s should be consistent with previous receiver name server for Server (golint)
    • Line 1292: warning: comment on exported method Server.FilterText should be of the form "FilterText ..." (golint)
    • grumble/cmd/grumble/user.go
    • Line 16: warning: exported type User should have comment or be unexported (golint)
    • Line 28: warning: comment on exported function NewUser should be of the form "NewUser ..." (golint)
    • grumble/cmd/grumble/freeze.go
    • Line 25: warning: comment on exported method Server.FreezeToFile should be of the form "FreezeToFile ..." (golint)
    • Line 119: warning: comment on exported method Server.UnfreezeBanList should be of the form "UnfreezeBanList ..." (golint)
    • Line 121: warning: receiver name s should be consistent with previous receiver name server for Server (golint)
    • Line 150: warning: comment on exported function FreezeBan should be of the form "FreezeBan ..." (golint)
    • Line 202: warning: should omit 2nd value from range; this loop is equivalent to `for cid := range ...` (golint)
    • Line 215: warning: receiver name c should be consistent with previous receiver name channel for Channel (golint)
    • Line 310: warning: comment on exported method User.Unfreeze should be of the form "Unfreeze ..." (golint)
    • Line 311: warning: receiver name u should be consistent with previous receiver name user for User (golint)
    • Line 335: warning: comment on exported function FreezeACL should be of the form "FreezeACL ..." (golint)
    • Line 351: warning: comment on exported function FreezeGroup should be of the form "FreezeGroup ..." (golint)
    • Line 367: warning: comment on exported function NewServerFromFrozen should be of the form "NewServerFromFrozen ..." (golint)
    • Line 672: warning: should omit 2nd value from range; this loop is equivalent to `for chanId := range ...` (golint)
    • Line 684: warning: comment on exported method Server.UpdateFrozenUser should be of the form "UpdateFrozenUser ..." (golint)
    • Line 721: warning: comment on exported method Server.UpdateFrozenUserLastChannel should be of the form "UpdateFrozenUserLastChannel ..." (golint)
    • Line 740: warning: comment on exported method Server.DeleteFrozenUser should be of the form "DeleteFrozenUser ..." (golint)
    • Line 749: warning: comment on exported method Server.UpdateFrozenChannel should be of the form "UpdateFrozenChannel ..." (golint)
    • Line 763: warning: should omit 2nd value from range; this loop is equivalent to `for cid := range ...` (golint)
    • Line 817: warning: comment on exported method Server.DeleteFrozenChannel should be of the form "DeleteFrozenChannel ..." (golint)
    • grumble/pkg/replacefile/flags.go
    • Line 7: warning: exported type Flag should have comment or be unexported (golint)
    • Line 10: warning: exported const IgnoreMergeErrors should have comment (or a comment on this block) or be unexported (golint)
    • grumble/pkg/cryptstate/cryptstate.go
    • Line 16: warning: exported type CryptoMode should have comment or be unexported (golint)
    • Line 26: warning: exported type CryptState should have comment or be unexported (golint)
    • Line 65: warning: exported method CryptState.GenerateKey should have comment or be unexported (golint)
    • Line 96: warning: exported method CryptState.SetKey should have comment or be unexported (golint)
    • Line 118: warning: exported method CryptState.Decrypt should have comment or be unexported (golint)
    • Line 123: warning: don't use underscores in Go names; var plain_len should be plainLen (golint)
    • Line 231: warning: exported method CryptState.Encrypt should have comment or be unexported (golint)
    • grumble/pkg/freezer/writer.go
    • Line 44: warning: comment on exported type LogTx should be of the form "LogTx ..." (with optional leading article) (golint)
    • Line 54: warning: comment on exported function NewLogFile should be of the form "NewLogFile ..." (golint)
    • Line 72: warning: comment on exported method Log.Put should be of the form "Put ..." (golint)
    • Line 86: warning: comment on exported method Log.BeginTx should be of the form "BeginTx ..." (golint)
    • Line 95: warning: comment on exported method LogTx.Put should be of the form "Put ..." (golint)
    • grumble/pkg/acl/group.go
    • Line 1: warning: package comment should be of the form "Package acl ..." (golint)
    • Line 52: warning: should omit 2nd value from range; this loop is equivalent to `for uid := range ...` (golint)
    • Line 67: warning: should omit 2nd value from range; this loop is equivalent to `for uid := range ...` (golint)
    • Line 108: warning: should omit 2nd value from range; this loop is equivalent to `for uid := range ...` (golint)
    • Line 111: warning: should omit 2nd value from range; this loop is equivalent to `for uid := range ...` (golint)

gocyclo76%

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.

    • grumble/cmd/grumble/freeze.go
    • Line 377: warning: cyclomatic complexity 60 of function NewServerFromFrozen() is high (> 15) (gocyclo)
    • Line 215: warning: cyclomatic complexity 22 of function (*Channel).Unfreeze() is high (> 15) (gocyclo)
    • grumble/cmd/grumble/message.go
    • Line 549: warning: cyclomatic complexity 89 of function (*Server).handleUserStateMessage() is high (> 15) (gocyclo)
    • Line 148: warning: cyclomatic complexity 64 of function (*Server).handleChannelStateMessage() is high (> 15) (gocyclo)
    • Line 1029: warning: cyclomatic complexity 43 of function (*Server).handleAclMessage() is high (> 15) (gocyclo)
    • Line 1461: warning: cyclomatic complexity 22 of function (*Server).handleRequestBlob() is high (> 15) (gocyclo)
    • Line 1285: warning: cyclomatic complexity 20 of function (*Server).handleUserStatsMessage() is high (> 15) (gocyclo)
    • Line 958: warning: cyclomatic complexity 16 of function (*Server).handleTextMessage() is high (> 15) (gocyclo)
    • grumble/cmd/grumble/server.go
    • Line 718: warning: cyclomatic complexity 24 of function (*Server).updateCodecVersions() is high (> 15) (gocyclo)
    • Line 472: warning: cyclomatic complexity 22 of function (*Server).handleAuthenticate() is high (> 15) (gocyclo)
    • Line 813: warning: cyclomatic complexity 22 of function (*Server).sendUserList() is high (> 15) (gocyclo)
    • Line 577: warning: cyclomatic complexity 22 of function (*Server).finishAuthenticate() is high (> 15) (gocyclo)
    • Line 936: warning: cyclomatic complexity 18 of function (*Server).handleIncomingMessage() is high (> 15) (gocyclo)
    • Line 398: warning: cyclomatic complexity 18 of function (*Server).handlerLoop() is high (> 15) (gocyclo)
    • grumble/cmd/grumble/client.go
    • Line 451: warning: cyclomatic complexity 24 of function (*Client).tlsRecvLoop() is high (> 15) (gocyclo)
    • Line 318: warning: cyclomatic complexity 16 of function (*Client).udpRecvLoop() is high (> 15) (gocyclo)

ineffassign94%

IneffAssign detects ineffectual assignments in Go code.


license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


misspell91%

Misspell Finds commonly misspelled English words

    • grumble/cmd/grumble/murmurdb.go
    • Line 10: warning: "datbase" is a misspelling of "database" (misspell)
    • Line 293: warning: "existant" is a misspelling of "existent" (misspell)
    • Line 381: warning: "existant" is a misspelling of "existent" (misspell)
    • Line 386: warning: "existant" is a misspelling of "existent" (misspell)