Preparing report...

Report for github.com/byebyebruce/lockstepserver

A+    Excellent!    Found 11 issues across 19 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!


gocyclo94%

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.


golint42%

Golint is a linter for Go source code.

    • lockstepserver/util/config.go
    • Line 8: warning: exported function LoadConfig should have comment or be unexported (golint)
    • Line 11: 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 19: warning: exported function SaveConfig should have comment or be unexported (golint)
    • 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)
    • lockstepserver/network/protocol.go
    • Line 9: warning: exported type Packet should have comment or be unexported (golint)
    • Line 13: warning: exported type Protocol should have comment or be unexported (golint)
    • Line 17: warning: exported type DefaultPacket should have comment or be unexported (golint)
    • Line 21: warning: exported method DefaultPacket.Serialize should have comment or be unexported (golint)
    • Line 21: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 25: warning: exported method DefaultPacket.GetBody should have comment or be unexported (golint)
    • Line 25: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 29: warning: exported function NewDefaultPacket should have comment or be unexported (golint)
    • Line 39: warning: exported type DefaultProtocol should have comment or be unexported (golint)
    • Line 42: warning: exported method DefaultProtocol.ReadPacket should have comment or be unexported (golint)
    • Line 42: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • lockstepserver/network/server.go
    • Line 9: warning: exported type Config should have comment or be unexported (golint)
    • Line 16: warning: exported type Server should have comment or be unexported (golint)
    • Line 37: warning: exported type ConnectionCreator should have comment or be unexported (golint)
    • lockstepserver/kcp_server/example_test.go
    • Line 1: warning: don't use an underscore in package name (golint)
    • Line 80: warning: don't use underscores in Go names; const max_con should be maxCon (golint)
    • Line 153: warning: don't use underscores in Go names; var max_con should be maxCon (golint)
    • Line 235: warning: don't use underscores in Go names; const max_con should be maxCon (golint)
    • lockstepserver/util/color_logger.go
    • Line 48: warning: comment on exported type ConsoleLogWriter should be of the form "ConsoleLogWriter ..." (with optional leading article) (golint)
    • Line 51: warning: comment on exported function NewColorConsoleLogWriter should be of the form "NewColorConsoleLogWriter ..." (golint)
    • Line 77: warning: comment on exported method ConsoleLogWriter.LogWrite should be of the form "LogWrite ..." (golint)
    • lockstepserver/room/game/game.go
    • Line 18: warning: don't use underscores in Go names; const k_Ready should be kReady (golint)
    • Line 19: warning: don't use underscores in Go names; const k_Gaming should be kGaming (golint)
    • Line 20: warning: don't use underscores in Go names; const k_Over should be kOver (golint)
    • Line 21: warning: don't use underscores in Go names; const k_Stop should be kStop (golint)
    • Line 25: warning: exported const MaxReadyTime should have comment (or a comment on this block) or be unexported (golint)
    • lockstepserver/room/game/player.go
    • Line 8: warning: exported type Player should have comment or be unexported (golint)
    • Line 19: warning: exported function NewPlayer should have comment or be unexported (golint)
    • Line 28: warning: exported method Player.Connect should have comment or be unexported (golint)
    • Line 35: warning: exported method Player.IsOnline should have comment or be unexported (golint)
    • Line 39: warning: exported method Player.RefreshHeartbeatTime should have comment or be unexported (golint)
    • Line 43: warning: exported method Player.GetLastHeartbeatTime should have comment or be unexported (golint)
    • Line 47: warning: exported method Player.SetSendFrameCount should have comment or be unexported (golint)
    • Line 51: warning: exported method Player.GetSendFrameCount should have comment or be unexported (golint)
    • Line 55: warning: exported method Player.SendMessage should have comment or be unexported (golint)
    • Line 66: warning: exported method Player.Cleanup should have comment or be unexported (golint)
    • lockstepserver/protocol/protocol.go
    • Line 14: warning: exported const DataLen should have comment (or a comment on this block) or be unexported (golint)
    • Line 37: warning: exported method Packet.GetMessageID should have comment or be unexported (golint)
    • Line 41: warning: exported method Packet.GetData should have comment or be unexported (golint)
    • Line 45: warning: exported method Packet.Serialize should have comment or be unexported (golint)
    • Line 55: warning: exported method Packet.UnmarshalPB should have comment or be unexported (golint)
    • Line 59: warning: exported function NewPacket should have comment or be unexported (golint)
    • Line 85: warning: exported type MsgProtocol should have comment or be unexported (golint)
    • Line 88: warning: exported method MsgProtocol.ReadPacket should have comment or be unexported (golint)
    • lockstepserver/room/room.go
    • Line 15: warning: exported const Frequency should have comment (or a comment on this block) or be unexported (golint)
    • Line 96: warning: exported method Room.OnJoinGame should have comment or be unexported (golint)
    • Line 99: warning: exported method Room.OnGameStart should have comment or be unexported (golint)
    • Line 103: warning: exported method Room.OnLeaveGame should have comment or be unexported (golint)
    • Line 106: warning: exported method Room.OnGameOver should have comment or be unexported (golint)
    • lockstepserver/network/conn.go
    • Line 45: warning: comment on exported function NewConn should be of the form "NewConn ..." (golint)
    • Line 89: warning: exported method Conn.SetCallback 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!