Preparing report...

Report for github.com/u2i/superstellar

An error occurred while generating the report.    Found 46 issues across 57 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!


gocyclo96%

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.


golint19%

Golint is a linter for Go source code.

    • superstellar/backend/state/object_state.go
    • Line 10: warning: exported type ObjectState should have comment or be unexported (golint)
    • Line 24: warning: exported function NewObjectState should have comment or be unexported (golint)
    • Line 40: warning: exported method ObjectState.Id should have comment or be unexported (golint)
    • Line 44: warning: exported method ObjectState.Position should have comment or be unexported (golint)
    • Line 48: warning: exported method ObjectState.SetPosition should have comment or be unexported (golint)
    • Line 52: warning: exported method ObjectState.Velocity should have comment or be unexported (golint)
    • Line 56: warning: exported method ObjectState.SetVelocity should have comment or be unexported (golint)
    • Line 60: warning: exported method ObjectState.Facing should have comment or be unexported (golint)
    • Line 64: warning: exported method ObjectState.SetFacing should have comment or be unexported (golint)
    • Line 68: warning: exported method ObjectState.AngularVelocity should have comment or be unexported (golint)
    • Line 72: warning: exported method ObjectState.SetAngularVelocity should have comment or be unexported (golint)
    • Line 76: warning: exported method ObjectState.AngularVelocityDelta should have comment or be unexported (golint)
    • Line 80: warning: exported method ObjectState.SetAngularVelocityDelta should have comment or be unexported (golint)
    • Line 84: warning: exported method ObjectState.Hp should have comment or be unexported (golint)
    • Line 88: warning: exported method ObjectState.SetHp should have comment or be unexported (golint)
    • Line 92: warning: exported method ObjectState.Dirty should have comment or be unexported (golint)
    • Line 96: warning: exported method ObjectState.SpawnTimestamp should have comment or be unexported (golint)
    • Line 100: warning: exported method ObjectState.MarkDirty should have comment or be unexported (golint)
    • Line 105: warning: exported method ObjectState.MarkClean should have comment or be unexported (golint)
    • Line 119: warning: exported method ObjectState.HandleDirtyTimeout should have comment or be unexported (golint)
    • Line 127: warning: exported method ObjectState.NotifyAboutNewFrame should have comment or be unexported (golint)
    • Line 132: warning: receiver name object should be consistent with previous receiver name objectState for ObjectState (golint)
    • superstellar/backend/constants/constants.go
    • Line 8: warning: exported const PhysicsFrameDuration should have comment (or a comment on this block) or be unexported (golint)
    • Line 28: warning: comment on exported const SpaceshipAcceleration should be of the form "SpaceshipAcceleration ..." (golint)
    • Line 31: warning: comment on exported const SpaceshipMaxAngularVelocity should be of the form "SpaceshipMaxAngularVelocity ..." (golint)
    • Line 46: warning: comment on exported const SpaceshipMaxSpeed should be of the form "SpaceshipMaxSpeed ..." (golint)
    • Line 61: warning: comment on exported const KillRewardRatio should be of the form "KillRewardRatio ..." (golint)
    • Line 64: warning: comment on exported const KillEnergyRewardRatio should be of the form "KillEnergyRewardRatio ..." (golint)
    • Line 67: warning: comment on exported const BasicWeaponEnergyCost should be of the form "BasicWeaponEnergyCost ..." (golint)
    • Line 70: warning: comment on exported const BoostPerFrameEnergyCost should be of the form "BoostPerFrameEnergyCost ..." (golint)
    • Line 82: warning: comment on exported const AutoRepairAmount should be of the form "AutoRepairAmount ..." (golint)
    • Line 85: warning: comment on exported const AutoEnergyRechargeAmount should be of the form "AutoEnergyRechargeAmount ..." (golint)
    • Line 88: warning: comment on exported const LeaderboardLength should be of the form "LeaderboardLength ..." (golint)
    • Line 100: warning: comment on exported const ProjectileDefaultTTL should be of the form "ProjectileDefaultTTL ..." (golint)
    • Line 118: warning: comment on exported const AsteroidRemoveRadius should be of the form "AsteroidRemoveRadius ..." (golint)
    • Line 124: warning: comment on exported const AsteroidDamageValue should be of the form "AsteroidDamageValue ..." (golint)
    • Line 127: warning: comment on exported const AsteroidInitialHp should be of the form "AsteroidInitialHp ..." (golint)
    • Line 130: warning: comment on exported const AsteroidKillReward should be of the form "AsteroidKillReward ..." (golint)
    • Line 133: warning: comment on exported const AsteroidKillEnergyReward should be of the form "AsteroidKillEnergyReward ..." (golint)
    • Line 136: warning: comment on exported const MaxNumberOfClients should be of the form "MaxNumberOfClients ..." (golint)
    • superstellar/backend/game/physics_ticker.go
    • Line 9: warning: exported type PhysicsTicker should have comment or be unexported (golint)
    • Line 14: warning: exported function NewPhysicsTicker should have comment or be unexported (golint)
    • Line 21: warning: exported method PhysicsTicker.Run should have comment or be unexported (golint)
    • superstellar/backend/leaderboard/full_leaderboard.go
    • Line 7: warning: should not use dot imports (golint)
    • Line 10: warning: exported type FullLeaderboard should have comment or be unexported (golint)
    • Line 14: warning: exported function FullLeaderboardFromSpace should have comment or be unexported (golint)
    • Line 27: warning: exported method FullLeaderboard.BuildLeaderboard should have comment or be unexported (golint)
    • Line 39: warning: exported method FullLeaderboard.BuildLeaderboards should have comment or be unexported (golint)
    • superstellar/backend/ai/bot_manager.go
    • Line 10: warning: exported type BotManager should have comment or be unexported (golint)
    • Line 18: warning: exported function NewBotManager should have comment or be unexported (golint)
    • Line 29: warning: exported method BotManager.CreateBots should have comment or be unexported (golint)
    • Line 35: warning: exported method BotManager.CreateNewBot should have comment or be unexported (golint)
    • Line 44: warning: exported method BotManager.HandleTimeTick should have comment or be unexported (golint)
    • Line 50: warning: exported method BotManager.HandleObjectDestroyed should have comment or be unexported (golint)
    • superstellar/backend/state/asteroid.go
    • Line 9: warning: exported type Asteroid should have comment or be unexported (golint)
    • Line 13: warning: exported function NewAsteroid should have comment or be unexported (golint)
    • Line 32: warning: exported method Asteroid.AddToProtoSpace should have comment or be unexported (golint)
    • Line 36: warning: exported method Asteroid.CollideWith should have comment or be unexported (golint)
    • Line 38: warning: exported method Asteroid.DamageValue should have comment or be unexported (golint)
    • Line 42: warning: exported method Asteroid.CollideWithProjectile should have comment or be unexported (golint)
    • Line 46: warning: exported method Asteroid.ObjectDestroyed should have comment or be unexported (golint)
    • superstellar/backend/state/spaceship.go
    • Line 45: warning: exported function NewSpaceship should have comment or be unexported (golint)
    • Line 67: warning: exported method Spaceship.UpdateUserInput should have comment or be unexported (golint)
    • Line 104: warning: exported method Spaceship.NotifyAboutNewFrame should have comment or be unexported (golint)
    • Line 111: warning: exported method Spaceship.UpdateTargetAngle should have comment or be unexported (golint)
    • Line 135: warning: exported method Spaceship.AddToProtoSpace should have comment or be unexported (golint)
    • Line 139: warning: exported method Spaceship.ShootIfPossible should have comment or be unexported (golint)
    • Line 151: warning: exported method Spaceship.BoostIfPossible should have comment or be unexported (golint)
    • Line 161: warning: exported method Spaceship.CollideWithProjectile should have comment or be unexported (golint)
    • Line 167: warning: exported method Spaceship.CollideWith should have comment or be unexported (golint)
    • Line 171: warning: exported method Spaceship.DamageValue should have comment or be unexported (golint)
    • Line 175: warning: exported method Spaceship.ProjectileHitOtherObject should have comment or be unexported (golint)
    • Line 179: warning: exported method Spaceship.ObjectDestroyed should have comment or be unexported (golint)
    • Line 198: warning: exported method Spaceship.IsFiring should have comment or be unexported (golint)
    • Line 232: warning: exported method Spaceship.LeftTurn should have comment or be unexported (golint)
    • Line 237: warning: exported method Spaceship.RightTurn should have comment or be unexported (golint)
    • Line 242: warning: exported method Spaceship.TurnToTarget should have comment or be unexported (golint)
    • Line 256: warning: exported method Spaceship.LimitAngularVelocityDelta should have comment or be unexported (golint)
    • Line 265: warning: exported method Spaceship.ApplyAngularFriction should have comment or be unexported (golint)
    • superstellar/backend/communication/score_board_sender.go
    • Line 10: warning: exported type ScoreBoardSender should have comment or be unexported (golint)
    • Line 18: warning: exported function NewScoreBoardSender should have comment or be unexported (golint)
    • Line 27: warning: exported method ScoreBoardSender.HandleUserJoined should have comment or be unexported (golint)
    • Line 31: warning: exported method ScoreBoardSender.HandleScoreSent should have comment or be unexported (golint)
    • superstellar/backend/communication/sender.go
    • Line 12: warning: exported type Sender should have comment or be unexported (golint)
    • Line 19: warning: exported function NewSender should have comment or be unexported (golint)
    • Line 28: warning: exported method Sender.HandlePhysicsReady should have comment or be unexported (golint)
    • Line 38: warning: exported method Sender.HandleProjectileFired should have comment or be unexported (golint)
    • Line 42: warning: exported method Sender.HandleProjectileHit should have comment or be unexported (golint)
    • Line 46: warning: exported method Sender.HandleUserConnected should have comment or be unexported (golint)
    • Line 50: warning: exported method Sender.HandleUserJoined should have comment or be unexported (golint)
    • Line 56: warning: exported method Sender.HandleUserLeft should have comment or be unexported (golint)
    • Line 66: warning: exported method Sender.HandleObjectDestroyed should have comment or be unexported (golint)
    • superstellar/backend/events/event_dispatcher.go
    • Line 21: warning: exported type TimeTickListener should have comment or be unexported (golint)
    • Line 25: warning: exported type PhysicsReadyListener should have comment or be unexported (golint)
    • Line 29: warning: exported type ProjectileFiredListener should have comment or be unexported (golint)
    • Line 33: warning: exported type ProjectileHitListener should have comment or be unexported (golint)
    • Line 37: warning: exported type UserConnectedListener should have comment or be unexported (golint)
    • Line 41: warning: exported type UserJoinedListener should have comment or be unexported (golint)
    • Line 45: warning: exported type UserLeftListener should have comment or be unexported (golint)
    • Line 49: warning: exported type ObjectDestroyedListener should have comment or be unexported (golint)
    • Line 53: warning: exported type UserInputListener should have comment or be unexported (golint)
    • Line 57: warning: exported type TargetAngleListener should have comment or be unexported (golint)
    • Line 61: warning: exported type ScoreSentListener should have comment or be unexported (golint)
    • Line 204: warning: exported type EventDispatcher should have comment or be unexported (golint)
    • Line 242: warning: exported function NewEventDispatcher should have comment or be unexported (golint)
    • Line 282: warning: exported method EventDispatcher.RunEventLoop should have comment or be unexported (golint)
    • Line 311: warning: exported type QueueFilling should have comment or be unexported (golint)
    • Line 316: warning: exported method EventDispatcher.QueuesFilling should have comment or be unexported (golint)
    • Line 330: warning: exported method EventDispatcher.RegisterTimeTickListener should have comment or be unexported (golint)
    • Line 336: warning: exported method EventDispatcher.FireTimeTick should have comment or be unexported (golint)
    • Line 347: warning: exported method EventDispatcher.RegisterPhysicsReadyListener should have comment or be unexported (golint)
    • Line 353: warning: exported method EventDispatcher.FirePhysicsReady should have comment or be unexported (golint)
    • Line 364: warning: exported method EventDispatcher.RegisterProjectileFiredListener should have comment or be unexported (golint)
    • Line 370: warning: exported method EventDispatcher.FireProjectileFired should have comment or be unexported (golint)
    • Line 381: warning: exported method EventDispatcher.RegisterProjectileHitListener should have comment or be unexported (golint)
    • Line 387: warning: exported method EventDispatcher.FireProjectileHit should have comment or be unexported (golint)
    • Line 398: warning: exported method EventDispatcher.RegisterUserConnectedListener should have comment or be unexported (golint)
    • Line 404: warning: exported method EventDispatcher.FireUserConnected should have comment or be unexported (golint)
    • Line 415: warning: exported method EventDispatcher.RegisterUserJoinedListener should have comment or be unexported (golint)
    • Line 421: warning: exported method EventDispatcher.FireUserJoined should have comment or be unexported (golint)
    • Line 432: warning: exported method EventDispatcher.RegisterUserLeftListener should have comment or be unexported (golint)
    • Line 438: warning: exported method EventDispatcher.FireUserLeft should have comment or be unexported (golint)
    • Line 449: warning: exported method EventDispatcher.RegisterObjectDestroyedListener should have comment or be unexported (golint)
    • Line 455: warning: exported method EventDispatcher.FireObjectDestroyed should have comment or be unexported (golint)
    • Line 466: warning: exported method EventDispatcher.RegisterUserInputListener should have comment or be unexported (golint)
    • Line 472: warning: exported method EventDispatcher.FireUserInput should have comment or be unexported (golint)
    • Line 483: warning: exported method EventDispatcher.RegisterTargetAngleListener should have comment or be unexported (golint)
    • Line 489: warning: exported method EventDispatcher.FireTargetAngle should have comment or be unexported (golint)
    • Line 500: warning: exported method EventDispatcher.RegisterScoreSentListener should have comment or be unexported (golint)
    • Line 506: warning: exported method EventDispatcher.FireScoreSent should have comment or be unexported (golint)
    • superstellar/backend/simulation/updater.go
    • Line 12: warning: exported type Updater should have comment or be unexported (golint)
    • Line 24: warning: exported function NewUpdater should have comment or be unexported (golint)
    • Line 39: warning: exported method Updater.HandleUserInput should have comment or be unexported (golint)
    • Line 47: warning: exported method Updater.HandleTargetAngle should have comment or be unexported (golint)
    • Line 55: warning: exported method Updater.HandleTimeTick should have comment or be unexported (golint)
    • Line 81: warning: exported method Updater.HandleUserJoined should have comment or be unexported (golint)
    • Line 85: warning: exported method Updater.HandleUserLeft should have comment or be unexported (golint)
    • Line 101: warning: exported method Updater.HandleObjectDestroyed should have comment or be unexported (golint)
    • superstellar/backend/state/projectile.go
    • Line 59: warning: exported method Projectile.ToMessage should have comment or be unexported (golint)
    • Line 67: warning: exported method Projectile.ToHitMessage should have comment or be unexported (golint)
    • Line 77: warning: exported method Projectile.DetectCollision should have comment or be unexported (golint)
    • superstellar/backend/communication/server.go
    • Line 76: warning: exported method Server.SendToAllClients should have comment or be unexported (golint)
    • Line 83: warning: exported method Server.SendToClient should have comment or be unexported (golint)
    • Line 95: warning: exported method Server.HandleUserLeft should have comment or be unexported (golint)
    • Line 99: warning: exported method Server.ClientIDs should have comment or be unexported (golint)
    • Line 108: warning: exported method Server.GetClient should have comment or be unexported (golint)
    • superstellar/backend/utils/id_manager.go
    • Line 5: warning: exported type IdManager should have comment or be unexported (golint)
    • Line 13: warning: exported function NewIdManager should have comment or be unexported (golint)
    • Line 22: warning: exported method IdManager.NextPlayerId should have comment or be unexported (golint)
    • Line 26: warning: exported method IdManager.NextBotId should have comment or be unexported (golint)
    • Line 30: warning: exported method IdManager.NextAsteroidsId should have comment or be unexported (golint)
    • Line 34: warning: exported method IdManager.IsPlayerId should have comment or be unexported (golint)
    • Line 39: warning: exported method IdManager.IsBotsId should have comment or be unexported (golint)
    • Line 44: warning: exported method IdManager.IsAsteroidsId should have comment or be unexported (golint)
    • superstellar/backend/code_generation/generate_event_dispatcher.go
    • Line 44: warning: exported type Priority should have comment or be unexported (golint)
    • Line 50: warning: exported type Priorites should have comment or be unexported (golint)
    • Line 66: warning: exported method Priority.QueueName should have comment or be unexported (golint)
    • Line 70: warning: exported type EventType should have comment or be unexported (golint)
    • Line 75: warning: exported function NewEventType should have comment or be unexported (golint)
    • Line 82: warning: exported method EventType.TypeName should have comment or be unexported (golint)
    • Line 86: warning: exported method EventType.ListenerTypeName should have comment or be unexported (golint)
    • Line 90: warning: exported method EventType.HandlerTypeName should have comment or be unexported (golint)
    • Line 94: warning: exported method EventType.ListenerListName should have comment or be unexported (golint)
    • Line 98: warning: exported method EventType.ListenerHandleMethodName should have comment or be unexported (golint)
    • Line 102: warning: exported method EventType.RegisterMethodName should have comment or be unexported (golint)
    • Line 106: warning: exported method EventType.FireMethodName should have comment or be unexported (golint)
    • Line 110: warning: exported method EventType.EventsQueueName should have comment or be unexported (golint)
    • Line 114: warning: exported type Metadata should have comment or be unexported (golint)
    • Line 122: warning: exported method Metadata.OrderedPriorities should have comment or be unexported (golint)
    • Line 314: warning: don't use underscores in Go names; var formatted_code should be formattedCode (golint)
    • superstellar/backend/utils/user_names_registry.go
    • Line 3: warning: exported type UserNamesRegistry should have comment or be unexported (golint)
    • Line 7: warning: exported function NewUserNameRegistry should have comment or be unexported (golint)
    • Line 13: warning: exported method UserNamesRegistry.AddUserName should have comment or be unexported (golint)
    • Line 17: warning: exported method UserNamesRegistry.GetUserName should have comment or be unexported (golint)
    • superstellar/backend/monitor/monitor.go
    • Line 28: warning: exported function NewMonitor should have comment or be unexported (golint)
    • Line 40: warning: exported method Monitor.Run should have comment or be unexported (golint)
    • Line 45: warning: exported method Monitor.AddSendTime should have comment or be unexported (golint)
    • Line 51: warning: exported method Monitor.AddPhysicsTime should have comment or be unexported (golint)
    • Line 57: warning: exported method Monitor.AddDroppedMessage should have comment or be unexported (golint)
    • superstellar/backend/communication/file_writer.go
    • Line 17: warning: exported const DIRECTORY should have comment (or a comment on this block) or be unexported (golint)
    • Line 20: warning: exported type FileWriter should have comment or be unexported (golint)
    • Line 26: warning: exported function NewFileWriter should have comment or be unexported (golint)
    • Line 60: warning: exported method FileWriter.Run should have comment or be unexported (golint)
    • Line 94: warning: exported method FileWriter.HandlePhysicsReady should have comment or be unexported (golint)
    • Line 98: warning: exported method FileWriter.HandleTimeTick should have comment or be unexported (golint)
    • superstellar/backend/ai/clever_bot.go
    • Line 11: warning: exported const AverageChangeTargetAfter should have comment (or a comment on this block) or be unexported (golint)
    • Line 19: warning: exported type CleverBot should have comment or be unexported (golint)
    • Line 27: warning: exported function NewCleverBot should have comment or be unexported (golint)
    • Line 36: warning: exported method CleverBot.HandleStateUpdate 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!


misspell0%

Misspell Finds commonly misspelled English words

An error occurred while running this test (exit status 2)