Preparing report...

Report for github.com/GomeBox/sdl2

A+    Excellent!    Found 17 issues across 21 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!


gocyclo95%

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.

    • sdl2/system.go
    • Line 8: warning: should not use dot imports (golint)
    • Line 9: warning: should not use dot imports (golint)
    • Line 10: warning: should not use dot imports (golint)
    • Line 16: warning: exported type System should have comment or be unexported (golint)
    • Line 22: warning: exported function NewSystem should have comment or be unexported (golint)
    • Line 30: warning: exported method System.Initialize should have comment or be unexported (golint)
    • Line 47: warning: exported method System.Update should have comment or be unexported (golint)
    • Line 54: warning: exported method System.Input should have comment or be unexported (golint)
    • Line 58: warning: exported method System.Graphics should have comment or be unexported (golint)
    • Line 62: warning: exported method System.Audio should have comment or be unexported (golint)
    • sdl2/graphics/textCreator.go
    • Line 10: warning: exported type TextCreator should have comment or be unexported (golint)
    • Line 15: warning: exported method TextCreator.Create should have comment or be unexported (golint)
    • sdl2/graphics/textDrawer.go
    • Line 10: warning: exported type TextDrawer should have comment or be unexported (golint)
    • Line 14: warning: exported function NewTextDrawer should have comment or be unexported (golint)
    • Line 20: warning: exported method TextDrawer.Draw should have comment or be unexported (golint)
    • Line 27: warning: exported method TextDrawer.DrawScaled should have comment or be unexported (golint)
    • Line 31: warning: exported method TextDrawer.DrawF should have comment or be unexported (golint)
    • Line 38: warning: exported method TextDrawer.DrawScaledF should have comment or be unexported (golint)
    • Line 42: warning: exported method TextDrawer.Dimensions should have comment or be unexported (golint)
    • sdl2/graphics/textureDrawer.go
    • Line 36: warning: exported function ConvertRect should have comment or be unexported (golint)
    • Line 43: warning: exported function ConvertRectF should have comment or be unexported (golint)
    • sdl2/input/inputAdapter.go
    • Line 11: warning: exported type InputAdapter should have comment or be unexported (golint)
    • Line 16: warning: exported function NewInputAdapter should have comment or be unexported (golint)
    • sdl2/audio/audioAdapter.go
    • Line 9: warning: exported type AudioAdapter should have comment or be unexported (golint)
    • Line 20: warning: exported function NewAudioAdapter should have comment or be unexported (golint)
    • sdl2/mocks/audioAdapter.go
    • Line 7: warning: exported type AudioAdapter should have comment or be unexported (golint)
    • Line 11: warning: exported method AudioAdapter.Init should have comment or be unexported (golint)
    • Line 16: warning: exported method AudioAdapter.SongLoader should have comment or be unexported (golint)
    • Line 20: warning: exported method AudioAdapter.SoundLoader should have comment or be unexported (golint)
    • sdl2/mocks/fontLoader.go
    • Line 5: warning: exported type FontLoader should have comment or be unexported (golint)
    • Line 8: warning: exported method FontLoader.Load should have comment or be unexported (golint)
    • sdl2/mocks/graphicsAdapter.go
    • Line 8: warning: exported type GraphicsAdapter should have comment or be unexported (golint)
    • Line 12: warning: exported method GraphicsAdapter.Init should have comment or be unexported (golint)
    • Line 17: warning: exported method GraphicsAdapter.OpenWindow should have comment or be unexported (golint)
    • Line 21: warning: exported method GraphicsAdapter.Size should have comment or be unexported (golint)
    • Line 25: warning: exported method GraphicsAdapter.IsOpen should have comment or be unexported (golint)
    • Line 29: warning: exported method GraphicsAdapter.TextureLoader should have comment or be unexported (golint)
    • Line 33: warning: exported method GraphicsAdapter.WindowAdapter should have comment or be unexported (golint)
    • Line 37: warning: exported method GraphicsAdapter.ScreenPresenter should have comment or be unexported (golint)
    • Line 41: warning: exported method GraphicsAdapter.FontLoader should have comment or be unexported (golint)
    • Line 45: warning: exported method GraphicsAdapter.TextureCreator should have comment or be unexported (golint)
    • Line 49: warning: exported method GraphicsAdapter.Create should have comment or be unexported (golint)
    • Line 53: warning: exported method GraphicsAdapter.Load should have comment or be unexported (golint)
    • Line 57: warning: exported method GraphicsAdapter.Present should have comment or be unexported (golint)
    • Line 61: warning: exported method GraphicsAdapter.Clear should have comment or be unexported (golint)
    • sdl2/mocks/inputAdapter.go
    • Line 5: warning: exported type InputAdapter should have comment or be unexported (golint)
    • Line 9: warning: exported method InputAdapter.Init should have comment or be unexported (golint)
    • Line 14: warning: exported method InputAdapter.Update should have comment or be unexported (golint)
    • Line 17: warning: exported method InputAdapter.Keyboard should have comment or be unexported (golint)
    • Line 21: warning: exported method InputAdapter.ControllerCount should have comment or be unexported (golint)
    • Line 25: warning: exported method InputAdapter.Controller should have comment or be unexported (golint)
    • sdl2/graphics/fontLoader.go
    • Line 9: warning: exported type FontLoader should have comment or be unexported (golint)
    • Line 17: warning: exported function NewFontLoader should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign61%

IneffAssign detects ineffectual assignments in Go code.

    • sdl2/input/keyboard.go
    • Line 36: warning: cannot use sdl.SCANCODE_ESCAPE (constant unknown with invalid type) as uint8 value in argument to addKeymapKey (ineffassign)
    • Line 36: warning: cannot use sdl.SCANCODE_ESCAPE (constant unknown with invalid type) as uint8 value in argument to addKeymapKey (ineffassign)
    • sdl2/system.go
    • Line 43: warning: cannot use sdl.HINT_RENDER_SCALE_QUALITY (constant unknown with invalid type) as string value in argument to sdl.SetHint (ineffassign)
    • Line 43: warning: cannot use sdl.HINT_RENDER_SCALE_QUALITY (constant unknown with invalid type) as string value in argument to sdl.SetHint (ineffassign)

misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!