Preparing report...

Report for github.com/mckinnsb/gogosnek

A    Great!    Found 14 issues across 15 files

Tweet

gofmt93%

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!


gocyclo100%

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.

No problems detected. Good job!


golint13%

Golint is a linter for Go source code.

    • gogosnek/chef.go
    • Line 8: warning: exported type Chef should have comment or be unexported (golint)
    • Line 12: warning: exported method Chef.MakeApple should have comment or be unexported (golint)
    • Line 18: warning: exported method Chef.MakeEdibleForLevel should have comment or be unexported (golint)
    • Line 33: warning: exported method Chef.Start should have comment or be unexported (golint)
    • gogosnek/draw.go
    • Line 12: warning: exported type Drawable should have comment or be unexported (golint)
    • Line 21: warning: exported function DoLevelAnimation should have comment or be unexported (golint)
    • Line 109: warning: exported function Draw should have comment or be unexported (golint)
    • Line 129: warning: exported function DrawBackground should have comment or be unexported (golint)
    • Line 134: warning: exported function DrawObject should have comment or be unexported (golint)
    • gogosnek/main.go
    • Line 13: warning: exported const GameWidth should have comment or be unexported (golint)
    • Line 14: warning: exported const GameHeight should have comment or be unexported (golint)
    • Line 15: warning: exported const MaxLevels should have comment or be unexported (golint)
    • Line 17: warning: comment on exported const FPS should be of the form "FPS ..." (golint)
    • Line 20: warning: exported type GameState should have comment or be unexported (golint)
    • Line 38: warning: exported method GameState.AdvanceLevel should have comment or be unexported (golint)
    • Line 60: warning: exported method GameState.End should have comment or be unexported (golint)
    • Line 66: warning: exported method GameState.Main should have comment or be unexported (golint)
    • Line 88: warning: exported method GameState.NextLevel should have comment or be unexported (golint)
    • Line 102: warning: exported method GameState.Start should have comment or be unexported (golint)
    • Line 108: warning: exported method GameState.Update should have comment or be unexported (golint)
    • gogosnek/snake.go
    • Line 25: warning: comment on exported type Snake should be of the form "Snake ..." (with optional leading article) (golint)
    • Line 61: warning: exported method Snake.AddPosition should have comment or be unexported (golint)
    • Line 72: warning: exported method Snake.Collider should have comment or be unexported (golint)
    • Line 78: warning: exported method Snake.Eat should have comment or be unexported (golint)
    • Line 116: warning: exported method Snake.EatingTail should have comment or be unexported (golint)
    • Line 146: warning: exported method Snake.GetDrawTail should have comment or be unexported (golint)
    • Line 167: warning: exported method Snake.GetImageForSize should have comment or be unexported (golint)
    • Line 189: warning: exported method Snake.GetMyTail should have comment or be unexported (golint)
    • Line 214: warning: exported method Snake.GetSegments should have comment or be unexported (golint)
    • Line 247: warning: exported method Snake.GetColliderAt should have comment or be unexported (golint)
    • Line 257: warning: exported method Snake.GetTail should have comment or be unexported (golint)
    • Line 277: warning: exported method Snake.IsColliding should have comment or be unexported (golint)
    • Line 284: warning: exported method Snake.ResetToStartSize should have comment or be unexported (golint)
    • Line 298: warning: should omit 2nd value from range; this loop is equivalent to `for i := range ...` (golint)
    • Line 312: warning: exported method Snake.Start should have comment or be unexported (golint)
    • Line 340: warning: exported method Snake.Update should have comment or be unexported (golint)
    • gogosnek/snake_image.go
    • Line 10: warning: exported type SnakeImage should have comment or be unexported (golint)
    • Line 14: warning: exported method SnakeImage.Start should have comment or be unexported (golint)
    • gogosnek/apple.go
    • Line 11: warning: exported type Apple should have comment or be unexported (golint)
    • Line 32: warning: exported method Apple.Collider should have comment or be unexported (golint)
    • Line 37: warning: exported method Apple.PlaceRandomly should have comment or be unexported (golint)
    • gogosnek/input.go
    • Line 5: warning: exported type InputHandler should have comment or be unexported (golint)
    • Line 24: warning: exported method GameState.HandleMovement should have comment or be unexported (golint)
    • Line 54: warning: exported method InputHandler.ProcessInput should have comment or be unexported (golint)
    • Line 78: warning: exported method InputHandler.WaitForOption should have comment or be unexported (golint)
    • gogosnek/rect.go
    • Line 8: warning: exported type Rect should have comment or be unexported (golint)
    • Line 12: warning: exported method Rect.CollidesWith should have comment or be unexported (golint)
    • gogosnek/tail.go
    • Line 3: warning: exported type Tail should have comment or be unexported (golint)
    • Line 4: warning: exported type MyTail should have comment or be unexported (golint)
    • Line 5: warning: exported type DrawTail should have comment or be unexported (golint)
    • Line 13: warning: exported method Tail.Skip should have comment or be unexported (golint)
    • Line 31: warning: exported method MyTail.Skip should have comment or be unexported (golint)
    • gogosnek/vector.go
    • Line 6: warning: exported type Vector2 should have comment or be unexported (golint)
    • Line 10: warning: comment on exported method Vector2.Add should be of the form "Add ..." (golint)
    • Line 15: warning: comment on exported function AddVectors should be of the form "AddVectors ..." (golint)
    • Line 22: warning: comment on exported method Vector2.ClampToWindow should be of the form "ClampToWindow ..." (golint)
    • Line 23: warning: receiver name v should be consistent with previous receiver name v1 for Vector2 (golint)
    • Line 52: warning: comment on exported method Vector2.Multiply should be of the form "Multiply ..." (golint)
    • Line 53: warning: receiver name v should be consistent with previous receiver name v1 for Vector2 (golint)
    • Line 57: warning: comment on exported function MultiplyVector should be of the form "MultiplyVector ..." (golint)
    • Line 64: warning: comment on exported method Vector2.Reverse should be of the form "Reverse ..." (golint)
    • Line 65: warning: receiver name v should be consistent with previous receiver name v1 for Vector2 (golint)

license0%

Checks whether your project has a LICENSE file.


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!