Preparing report...

Report for github.com/VacPlusPlus/go-mc

A+    Excellent!    Found 33 issues across 77 files

Tweet

gofmt97%

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!


golint61%

Golint is a linter for Go source code.

    • go-mc/nbt/decode.go
    • Line 12: warning: exported function Unmarshal should have comment or be unexported (golint)
    • Line 16: warning: exported method Decoder.Decode should have comment or be unexported (golint)
    • go-mc/examples/simpleServer/main.go
    • Line 12: warning: exported const ProtocolVersion should have comment or be unexported (golint)
    • Line 13: warning: exported const MaxPlayer should have comment or be unexported (golint)
    • Line 96: warning: exported type PlayerInfo should have comment or be unexported (golint)
    • go-mc/examples/daze/daze.go
    • Line 54: 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 87: warning: exported type DisconnectErr should have comment or be unexported (golint)
    • go-mc/net/CFB8/cfb8.go
    • Line 3: warning: don't use MixedCaps in package name; CFB8 should be cfb8 (golint)
    • Line 7: warning: exported type CFB8 should have comment or be unexported (golint)
    • Line 14: warning: exported function NewCFB8Decrypt should have comment or be unexported (golint)
    • Line 26: warning: exported function NewCFB8Encrypt should have comment or be unexported (golint)
    • Line 38: warning: exported method CFB8.XORKeyStream should have comment or be unexported (golint)
    • go-mc/yggdrasil/authenticate.go
    • Line 7: warning: exported type Access should have comment or be unexported (golint)
    • Line 59: warning: exported type Profile should have comment or be unexported (golint)
    • Line 93: warning: exported method Access.SelectedProfile should have comment or be unexported (golint)
    • Line 97: warning: exported method Access.AccessToken should have comment or be unexported (golint)
    • Line 101: warning: exported method Access.AvailableProfiles should have comment or be unexported (golint)
    • Line 105: warning: exported method Access.SetTokens should have comment or be unexported (golint)
    • Line 108: warning: exported method Access.GetTokens should have comment or be unexported (golint)
    • go-mc/save/playerdata.go
    • Line 10: warning: exported type PlayerData should have comment or be unexported (golint)
    • Line 74: warning: exported type Item should have comment or be unexported (golint)
    • Line 81: warning: exported function ReadPlayerData should have comment or be unexported (golint)
    • go-mc/net/packet/types.go
    • Line 75: warning: exported const MaxVarIntLen should have comment or be unexported (golint)
    • Line 76: warning: exported const MaxVarLongLen should have comment or be unexported (golint)
    • Line 78: warning: comment on exported method Boolean.WriteTo should be of the form "WriteTo ..." (golint)
    • Line 90: warning: comment on exported method Boolean.ReadFrom should be of the form "ReadFrom ..." (golint)
    • Line 101: warning: comment on exported method String.WriteTo should be of the form "WriteTo ..." (golint)
    • Line 112: warning: comment on exported method String.ReadFrom should be of the form "ReadFrom ..." (golint)
    • Line 142: warning: comment on exported method Byte.WriteTo should be of the form "WriteTo ..." (golint)
    • Line 148: warning: comment on exported method Byte.ReadFrom should be of the form "ReadFrom ..." (golint)
    • Line 158: warning: comment on exported method UnsignedByte.WriteTo should be of the form "WriteTo ..." (golint)
    • Line 164: warning: comment on exported method UnsignedByte.ReadFrom should be of the form "ReadFrom ..." (golint)
    • Line 174: warning: comment on exported method Short.WriteTo should be of the form "WriteTo ..." (golint)
    • Line 181: warning: comment on exported method Short.ReadFrom should be of the form "ReadFrom ..." (golint)
    • Line 186: 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 194: warning: comment on exported method UnsignedShort.WriteTo should be of the form "WriteTo ..." (golint)
    • Line 201: warning: comment on exported method UnsignedShort.ReadFrom should be of the form "ReadFrom ..." (golint)
    • Line 206: 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 214: warning: comment on exported method Int.WriteTo should be of the form "WriteTo ..." (golint)
    • Line 221: warning: comment on exported method Int.ReadFrom should be of the form "ReadFrom ..." (golint)
    • Line 226: 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 234: warning: comment on exported method Long.WriteTo should be of the form "WriteTo ..." (golint)
    • Line 244: warning: comment on exported method Long.ReadFrom should be of the form "ReadFrom ..." (golint)
    • Line 249: 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 258: warning: comment on exported method VarInt.WriteTo should be of the form "WriteTo ..." (golint)
    • Line 277: warning: comment on exported method VarInt.ReadFrom should be of the form "ReadFrom ..." (golint)
    • Line 297: warning: comment on exported method VarLong.WriteTo should be of the form "WriteTo ..." (golint)
    • Line 316: warning: comment on exported method VarLong.ReadFrom should be of the form "ReadFrom ..." (golint)
    • Line 335: warning: comment on exported method Position.WriteTo should be of the form "WriteTo ..." (golint)
    • Line 347: warning: comment on exported method Position.ReadFrom should be of the form "ReadFrom ..." (golint)
    • Line 385: warning: exported method Angle.WriteTo should have comment or be unexported (golint)
    • Line 389: warning: exported method Angle.ReadFrom should have comment or be unexported (golint)
    • Line 393: warning: comment on exported method Float.WriteTo should be of the form "WriteTo ..." (golint)
    • Line 398: warning: comment on exported method Float.ReadFrom should be of the form "ReadFrom ..." (golint)
    • Line 411: warning: comment on exported method Double.WriteTo should be of the form "WriteTo ..." (golint)
    • Line 416: warning: comment on exported method Double.ReadFrom should be of the form "ReadFrom ..." (golint)
    • Line 452: warning: comment on exported method ByteArray.WriteTo should be of the form "WriteTo ..." (golint)
    • Line 462: warning: comment on exported method ByteArray.ReadFrom should be of the form "ReadFrom ..." (golint)
    • Line 476: warning: comment on exported method UUID.WriteTo should be of the form "WriteTo ..." (golint)
    • Line 482: warning: comment on exported method UUID.ReadFrom should be of the form "ReadFrom ..." (golint)
    • go-mc/nbt/nbt.go
    • Line 27: warning: exported function IsArrayTag should have comment or be unexported (golint)
    • Line 31: warning: exported type DecoderReader should have comment or be unexported (golint)
    • Line 35: warning: exported type Decoder should have comment or be unexported (golint)
    • Line 39: warning: exported function NewDecoder should have comment or be unexported (golint)
    • go-mc/net/rcon.go
    • Line 12: warning: exported const MaxRCONPackageSize should have comment or be unexported (golint)
    • Line 14: warning: exported function DialRCON should have comment or be unexported (golint)
    • Line 49: warning: exported type RCONConn should have comment or be unexported (golint)
    • Line 54: warning: exported method RCONConn.ReadPacket should have comment or be unexported (golint)
    • Line 87: warning: exported method RCONConn.WritePacket should have comment or be unexported (golint)
    • Line 107: warning: exported method RCONConn.Cmd should have comment or be unexported (golint)
    • Line 112: warning: exported method RCONConn.Resp should have comment or be unexported (golint)
    • Line 128: warning: exported method RCONConn.AcceptLogin should have comment or be unexported (golint)
    • Line 157: warning: exported method RCONConn.AcceptCmd should have comment or be unexported (golint)
    • Line 173: warning: exported method RCONConn.RespCmd should have comment or be unexported (golint)
    • Line 177: warning: exported type RCONClientConn should have comment or be unexported (golint)
    • Line 183: warning: exported type RCONServerConn should have comment or be unexported (golint)
    • Line 190: warning: exported function ListenRCON should have comment or be unexported (golint)
    • Line 199: warning: exported type RCONListener should have comment or be unexported (golint)
    • Line 201: warning: exported method RCONListener.Accept should have comment or be unexported (golint)
    • go-mc/data/inv/inv.go
    • Line 4: warning: exported type Info should have comment or be unexported (golint)
    • Line 10: warning: exported method Info.PlayerInvStart should have comment or be unexported (golint)
    • Line 14: warning: exported method Info.PlayerInvEnd should have comment or be unexported (golint)
    • Line 18: warning: exported method Info.HotbarIdx should have comment or be unexported (golint)
    • Line 22: warning: exported var ByType should have comment or be unexported (golint)
    • go-mc/chat/chatMsg.go
    • Line 53: warning: comment on exported method Message.ReadFrom should be of the form "ReadFrom ..." (golint)
    • Line 64: warning: comment on exported method Message.WriteTo should be of the form "WriteTo ..." (golint)
    • Line 73: warning: exported method Message.Append should have comment or be unexported (golint)
    • Line 87: warning: exported function Text should have comment or be unexported (golint)
    • Line 91: warning: exported function TranslateMsg should have comment or be unexported (golint)
    • go-mc/realms/realms.go
    • Line 12: warning: exported type Realms should have comment or be unexported (golint)
    • Line 16: warning: exported type Error should have comment or be unexported (golint)
    • go-mc/save/level.go
    • Line 8: warning: exported type Level should have comment or be unexported (golint)
    • Line 67: warning: exported function ReadLevel should have comment or be unexported (golint)
    • go-mc/nbt/encode.go
    • Line 13: warning: exported function Marshal should have comment or be unexported (golint)
    • Line 17: warning: exported type Encoder should have comment or be unexported (golint)
    • Line 21: warning: exported function NewEncoder should have comment or be unexported (golint)
    • Line 25: warning: exported method Encoder.Encode should have comment or be unexported (golint)
    • Line 77: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • go-mc/bot/basic/events.go
    • Line 12: warning: exported type EventsListener should have comment or be unexported (golint)
    • Line 20: warning: exported method EventsListener.Attach should have comment or be unexported (golint)
    • go-mc/net/packet/util.go
    • Line 26: warning: exported method Ary.WriteTo should have comment or be unexported (golint)
    • Line 58: warning: exported method Ary.ReadFrom should have comment or be unexported (golint)
    • Line 81: warning: exported type Opt should have comment or be unexported (golint)
    • Line 102: warning: exported method Opt.WriteTo should have comment or be unexported (golint)
    • Line 109: warning: exported method Opt.ReadFrom should have comment or be unexported (golint)
    • Line 116: warning: exported type Tuple should have comment or be unexported (golint)
    • go-mc/bot/mcbot.go
    • Line 19: warning: exported const DefaultPort should have comment or be unexported (golint)
    • Line 148: warning: exported type LoginErr should have comment or be unexported (golint)
    • Line 161: warning: exported type DisconnectErr should have comment or be unexported (golint)
    • go-mc/net/interface.go
    • Line 5: warning: exported type Writer should have comment or be unexported (golint)
    • Line 9: warning: exported type Reader should have comment or be unexported (golint)
    • Line 13: warning: exported type ReadWriter should have comment or be unexported (golint)
    • go-mc/bot/event.go
    • Line 7: warning: exported type Events should have comment or be unexported (golint)
    • Line 12: warning: exported method Events.AddListener should have comment or be unexported (golint)
    • Line 37: warning: exported type PacketHandlerFunc should have comment or be unexported (golint)
    • Line 38: warning: exported type PacketHandler should have comment or be unexported (golint)
    • go-mc/save/chunk.go
    • Line 39: warning: exported type Chunk should have comment or be unexported (golint)
    • Line 47: warning: exported type Block should have comment or be unexported (golint)
    • go-mc/save/palette.go
    • Line 10: warning: exported type BlockState should have comment or be unexported (golint)
    • Line 57: 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 72: 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)
    • go-mc/net/packet/builder.go
    • Line 5: warning: exported type Builder should have comment or be unexported (golint)
    • Line 9: warning: exported method Builder.WriteField should have comment or be unexported (golint)
    • Line 18: warning: exported method Builder.Packet should have comment or be unexported (golint)
    • go-mc/bot/basic/basic.go
    • Line 9: warning: exported type Player should have comment or be unexported (golint)
    • Line 18: warning: exported function NewPlayer should have comment or be unexported (golint)
    • Line 28: warning: exported method Player.Respawn should have comment or be unexported (golint)
    • Line 42: warning: exported type Error should have comment or be unexported (golint)

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.


ineffassign98%

IneffAssign detects ineffectual assignments in Go code.


license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!