Preparing report...

Report for github.com/liamg/aminal

A+    Excellent!    Found 28 issues across 61 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!


gocyclo85%

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.

    • aminal/terminal/sgr.go
    • Line 12: warning: cyclomatic complexity 57 of function sgrSequenceHandler() is high (> 15) (gocyclo)
    • Line 209: warning: cyclomatic complexity 25 of function (*Terminal).get8BitSGRColour() is high (> 15) (gocyclo)
    • Line 148: warning: cyclomatic complexity 16 of function (*Terminal).getANSIColour() is high (> 15) (gocyclo)
    • aminal/gui/gui.go
    • Line 468: warning: cyclomatic complexity 37 of function (*GUI).redraw() is high (> 15) (gocyclo)
    • Line 296: warning: cyclomatic complexity 22 of function (*GUI).Render() is high (> 15) (gocyclo)

golint63%

Golint is a linter for Go source code.

    • aminal/gui/fontmap.go
    • Line 5: warning: exported type FontMap should have comment or be unexported (golint)
    • Line 10: warning: exported function NewFontMap should have comment or be unexported (golint)
    • Line 17: warning: exported method FontMap.Free should have comment or be unexported (golint)
    • Line 29: warning: exported method FontMap.AssignFonts should have comment or be unexported (golint)
    • Line 37: warning: exported method FontMap.UpdateResolution should have comment or be unexported (golint)
    • Line 42: warning: exported method FontMap.DefaultFont should have comment or be unexported (golint)
    • Line 46: warning: exported method FontMap.BoldFont should have comment or be unexported (golint)
    • aminal/gui/gui.go
    • Line 26: warning: exported type GUI should have comment or be unexported (golint)
    • Line 62: warning: exported function Min should have comment or be unexported (golint)
    • Line 69: warning: exported function Max should have comment or be unexported (golint)
    • Line 76: warning: exported type ResizeCache should have comment or be unexported (golint)
    • Line 83: warning: exported method GUI.GetMonitor should have comment or be unexported (golint)
    • Line 142: warning: exported function New should have comment or be unexported (golint)
    • Line 167: warning: receiver name gui should be consistent with previous receiver name g for GUI (golint)
    • Line 174: warning: receiver name gui should be consistent with previous receiver name g for GUI (golint)
    • Line 203: warning: receiver name gui should be consistent with previous receiver name g for GUI (golint)
    • Line 219: warning: receiver name gui should be consistent with previous receiver name g for GUI (golint)
    • Line 228: warning: receiver name gui should be consistent with previous receiver name g for GUI (golint)
    • Line 234: warning: receiver name gui should be consistent with previous receiver name g for GUI (golint)
    • Line 285: warning: receiver name gui should be consistent with previous receiver name g for GUI (golint)
    • Line 292: warning: exported method GUI.Close should have comment or be unexported (golint)
    • Line 292: warning: receiver name gui should be consistent with previous receiver name g for GUI (golint)
    • Line 296: warning: exported method GUI.Render should have comment or be unexported (golint)
    • Line 296: warning: receiver name gui should be consistent with previous receiver name g for GUI (golint)
    • Line 468: warning: receiver name gui should be consistent with previous receiver name g for GUI (golint)
    • Line 598: warning: receiver name gui should be consistent with previous receiver name g for GUI (golint)
    • Line 641: warning: receiver name gui should be consistent with previous receiver name g for GUI (golint)
    • Line 667: warning: receiver name gui should be consistent with previous receiver name g for GUI (golint)
    • Line 672: warning: receiver name gui should be consistent with previous receiver name g for GUI (golint)
    • Line 707: warning: receiver name gui should be consistent with previous receiver name g for GUI (golint)
    • Line 714: warning: exported method GUI.SwapBuffers should have comment or be unexported (golint)
    • Line 714: warning: receiver name gui should be consistent with previous receiver name g for GUI (golint)
    • Line 719: warning: exported method GUI.Screenshot should have comment or be unexported (golint)
    • Line 719: warning: receiver name gui should be consistent with previous receiver name g for GUI (golint)
    • Line 735: warning: receiver name gui should be consistent with previous receiver name g for GUI (golint)
    • Line 739: warning: receiver name gui should be consistent with previous receiver name g for GUI (golint)
    • aminal/glfont/font.go
    • Line 16: warning: exported const DPI should have comment or be unexported (golint)
    • Line 59: warning: exported method Font.Free should have comment or be unexported (golint)
    • Line 82: warning: exported method Font.UpdateResolution should have comment or be unexported (golint)
    • Line 90: warning: exported method Font.LineHeight should have comment or be unexported (golint)
    • Line 94: warning: exported method Font.LinePadding should have comment or be unexported (golint)
    • Line 98: warning: comment on exported method Font.Print should be of the form "Print ..." (golint)
    • Line 182: warning: comment on exported method Font.Size should be of the form "Size ..." (golint)
    • Line 217: warning: exported method Font.MaxSize should have comment or be unexported (golint)
    • Line 222: warning: exported method Font.MinY should have comment or be unexported (golint)
    • Line 227: warning: exported method Font.MaxY should have comment or be unexported (golint)
    • Line 232: warning: exported method Font.GetRune should have comment or be unexported (golint)
    • aminal/version/version.go
    • Line 12: warning: exported var Version should have comment or be unexported (golint)
    • Line 14: warning: exported type Release should have comment or be unexported (golint)
    • Line 19: warning: exported type Asset should have comment or be unexported (golint)
    • Line 38: warning: exported function GetNewerRelease should have comment or be unexported (golint)
    • aminal/config/colours.go
    • Line 10: warning: exported type Colour should have comment or be unexported (golint)
    • Line 40: warning: exported method Colour.UnmarshalText should have comment or be unexported (golint)
    • Line 46: warning: exported method Colour.MarshalText should have comment or be unexported (golint)
    • Line 55: warning: exported type ColourScheme should have comment or be unexported (golint)
    • aminal/buffer/buffer.go
    • Line 12: warning: exported type SelectionMode should have comment or be unexported (golint)
    • Line 15: warning: exported const SelectionChar should have comment (or a comment on this block) or be unexported (golint)
    • Line 20: warning: exported type Buffer should have comment or be unexported (golint)
    • Line 36: warning: exported type Position should have comment or be unexported (golint)
    • Line 65: warning: exported method Buffer.GetURLAtPosition should have comment or be unexported (golint)
    • Line 109: warning: exported method Buffer.IsSelectionComplete should have comment or be unexported (golint)
    • Line 162: warning: exported method Buffer.GetSelectedText should have comment or be unexported (golint)
    • Line 204: warning: exported method Buffer.StartSelection should have comment or be unexported (golint)
    • Line 227: warning: exported method Buffer.ExtendSelection should have comment or be unexported (golint)
    • Line 251: warning: exported method Buffer.ClearSelection should have comment or be unexported (golint)
    • Line 307: warning: exported method Buffer.InSelection should have comment or be unexported (golint)
    • Line 319: warning: exported method Buffer.IsDirty should have comment or be unexported (golint)
    • Line 327: warning: exported method Buffer.HasScrollableRegion should have comment or be unexported (golint)
    • Line 331: warning: exported method Buffer.InScrollableRegion should have comment or be unexported (golint)
    • Line 345: warning: exported method Buffer.AreaScrollDown should have comment or be unexported (golint)
    • Line 361: warning: exported method Buffer.AreaScrollUp should have comment or be unexported (golint)
    • Line 377: warning: exported method Buffer.SaveCursor should have comment or be unexported (golint)
    • Line 387: warning: exported method Buffer.RestoreCursor should have comment or be unexported (golint)
    • Line 401: warning: exported method Buffer.CursorAttr should have comment or be unexported (golint)
    • Line 405: warning: exported method Buffer.GetCell should have comment or be unexported (golint)
    • Line 410: warning: exported method Buffer.GetRawCell should have comment or be unexported (golint)
    • Line 425: warning: comment on exported method Buffer.CursorColumn should be of the form "CursorColumn ..." (golint)
    • Line 448: warning: exported method Buffer.TopMargin should have comment or be unexported (golint)
    • Line 452: warning: exported method Buffer.BottomMargin should have comment or be unexported (golint)
    • Line 456: warning: comment on exported method Buffer.RawLine should be of the form "RawLine ..." (golint)
    • Line 482: warning: exported method Buffer.ViewWidth should have comment or be unexported (golint)
    • Line 486: warning: exported method Buffer.Height should have comment or be unexported (golint)
    • Line 490: warning: exported method Buffer.ViewHeight should have comment or be unexported (golint)
    • Line 541: warning: exported method Buffer.InsertBlankCharacters should have comment or be unexported (golint)
    • Line 549: warning: exported method Buffer.InsertLines should have comment or be unexported (golint)
    • Line 562: warning: exported method Buffer.DeleteLines should have comment or be unexported (golint)
    • Line 575: warning: exported method Buffer.Index should have comment or be unexported (golint)
    • Line 604: warning: exported method Buffer.ReverseIndex should have comment or be unexported (golint)
    • Line 690: warning: exported method Buffer.Backspace should have comment or be unexported (golint)
    • Line 706: warning: exported method Buffer.CarriageReturn should have comment or be unexported (golint)
    • Line 722: warning: exported method Buffer.Tab should have comment or be unexported (golint)
    • Line 731: warning: exported method Buffer.NewLine should have comment or be unexported (golint)
    • Line 735: warning: exported method Buffer.NewLineEx should have comment or be unexported (golint)
    • Line 750: warning: exported method Buffer.IsNewLineMode should have comment or be unexported (golint)
    • Line 754: warning: exported method Buffer.MovePosition should have comment or be unexported (golint)
    • Line 774: warning: exported method Buffer.SetPosition should have comment or be unexported (golint)
    • Line 799: warning: exported method Buffer.GetVisibleLines should have comment or be unexported (golint)
    • Line 813: warning: exported method Buffer.Clear should have comment or be unexported (golint)
    • Line 845: warning: exported method Buffer.EraseLine should have comment or be unexported (golint)
    • Line 851: warning: exported method Buffer.EraseLineToCursor should have comment or be unexported (golint)
    • Line 861: warning: exported method Buffer.EraseLineFromCursor should have comment or be unexported (golint)
    • Line 878: warning: exported method Buffer.EraseDisplay should have comment or be unexported (golint)
    • Line 888: warning: exported method Buffer.DeleteChars should have comment or be unexported (golint)
    • Line 903: warning: exported method Buffer.EraseCharacters should have comment or be unexported (golint)
    • Line 918: warning: exported method Buffer.EraseDisplayFromCursor should have comment or be unexported (golint)
    • Line 934: warning: exported method Buffer.EraseDisplayToCursor should have comment or be unexported (golint)
    • Line 952: warning: exported method Buffer.ResizeView should have comment or be unexported (golint)
    • Line 1063: warning: exported method Buffer.SaveViewLines should have comment or be unexported (golint)
    • Line 1075: warning: exported method Buffer.CompareViewLines should have comment or be unexported (golint)
    • Line 1089: warning: exported method Buffer.ReverseVideo should have comment or be unexported (golint)
    • aminal/buffer/cell.go
    • Line 7: warning: exported type Cell should have comment or be unexported (golint)
    • Line 13: warning: exported type CellAttributes should have comment or be unexported (golint)
    • Line 24: warning: exported method Cell.Image should have comment or be unexported (golint)
    • Line 28: warning: exported method Cell.SetImage should have comment or be unexported (golint)
    • Line 32: warning: exported method Cell.Attr should have comment or be unexported (golint)
    • Line 36: warning: exported method Cell.Rune should have comment or be unexported (golint)
    • Line 40: warning: exported method Cell.Fg should have comment or be unexported (golint)
    • Line 47: warning: exported method Cell.Bg should have comment or be unexported (golint)
    • Line 63: warning: exported function NewBackgroundCell should have comment or be unexported (golint)
    • Line 71: warning: exported method CellAttributes.ReverseVideo should have comment or be unexported (golint)
    • aminal/hints/hint.go
    • Line 3: warning: exported type Hint should have comment or be unexported (golint)
    • Line 17: warning: exported function Get should have comment or be unexported (golint)
    • Line 26: warning: exported function NewHint should have comment or be unexported (golint)
    • aminal/config/config.go
    • Line 9: warning: exported type Config should have comment or be unexported (golint)
    • Line 21: warning: exported type KeyMappingConfig should have comment or be unexported (golint)
    • Line 23: warning: exported function Parse should have comment or be unexported (golint)
    • Line 32: warning: exported method Config.Encode should have comment or be unexported (golint)
    • aminal/platform/unixpty.go
    • Line 85: warning: receiver name pty should be consistent with previous receiver name p for unixPty (golint)
    • Line 89: warning: exported function NewPty should have comment or be unexported (golint)
    • aminal/buffer/line.go
    • Line 7: warning: exported type Line should have comment or be unexported (golint)
    • Line 19: warning: exported method Line.Cells should have comment or be unexported (golint)
    • Line 23: warning: exported method Line.ReverseVideo should have comment or be unexported (golint)
    • Line 56: warning: comment on exported method Line.CutCellsAfter should be of the form "CutCellsAfter ..." (golint)
    • Line 63: warning: exported method Line.CutCellsFromBeginning should have comment or be unexported (golint)
    • Line 72: warning: exported method Line.CutCellsFromEnd should have comment or be unexported (golint)
    • Line 78: warning: exported method Line.Append should have comment or be unexported (golint)
    • aminal/buffer/terminal_state.go
    • Line 3: warning: exported type TerminalState should have comment or be unexported (golint)
    • Line 23: warning: comment on exported function NewTerminalState should be of the form "NewTerminalState ..." (golint)
    • Line 42: warning: exported method TerminalState.DefaultCell should have comment or be unexported (golint)
    • Line 55: warning: exported method TerminalState.SetVerticalMargins should have comment or be unexported (golint)
    • Line 65: warning: exported method TerminalState.IsNewLineMode should have comment or be unexported (golint)
    • Line 69: warning: exported method TerminalState.TabZonk should have comment or be unexported (golint)
    • Line 73: warning: exported method TerminalState.TabSet should have comment or be unexported (golint)
    • Line 77: warning: exported method TerminalState.TabClear should have comment or be unexported (golint)
    • Line 89: warning: exported method TerminalState.IsTabSetAtCursor should have comment or be unexported (golint)
    • Line 95: warning: exported method TerminalState.TabClearAtCursor should have comment or be unexported (golint)
    • Line 99: warning: exported method TerminalState.TabSetAtCursor should have comment or be unexported (golint)
    • Line 103: warning: exported method TerminalState.TabReset should have comment or be unexported (golint)
    • Line 114: warning: exported method TerminalState.ViewHeight should have comment or be unexported (golint)
    • Line 118: warning: exported method TerminalState.GetScrollOffset should have comment or be unexported (golint)
    • Line 122: warning: exported method TerminalState.SetScrollOffset should have comment or be unexported (golint)
    • aminal/gui/renderer.go
    • Line 13: warning: exported type OpenGLRenderer should have comment or be unexported (golint)
    • Line 41: warning: exported method OpenGLRenderer.CellWidth should have comment or be unexported (golint)
    • Line 45: warning: exported method OpenGLRenderer.CellHeight should have comment or be unexported (golint)
    • Line 136: warning: exported function NewOpenGLRenderer should have comment or be unexported (golint)
    • Line 153: warning: comment on exported method OpenGLRenderer.Free should be of the form "Free ..." (golint)
    • Line 166: warning: exported method OpenGLRenderer.GetTermSize should have comment or be unexported (golint)
    • Line 170: warning: exported method OpenGLRenderer.SetArea should have comment or be unexported (golint)
    • Line 183: warning: exported method OpenGLRenderer.GetRectangleSize should have comment or be unexported (golint)
    • Line 197: warning: exported method OpenGLRenderer.DrawCursor should have comment or be unexported (golint)
    • Line 205: warning: exported method OpenGLRenderer.DrawCellBg should have comment or be unexported (golint)
    • Line 241: warning: exported method OpenGLRenderer.DrawCellText should have comment or be unexported (golint)
    • Line 257: warning: exported method OpenGLRenderer.DrawCellImage should have comment or be unexported (golint)
    • aminal/sixel/sixel.go
    • Line 11: warning: exported type Sixel should have comment or be unexported (golint)
    • Line 49: warning: comment on exported function ParseString should be of the form "ParseString ..." (golint)
    • Line 186: warning: exported method Sixel.RGBA should have comment or be unexported (golint)
    • aminal/config/actions.go
    • Line 3: warning: exported type UserAction should have comment or be unexported (golint)
    • Line 6: warning: exported const ActionCopy should have comment (or a comment on this block) or be unexported (golint)
    • aminal/config/keys.go
    • Line 10: warning: exported type KeyCombination should have comment or be unexported (golint)
    • Line 15: warning: exported type KeyMod should have comment or be unexported (golint)
    • Line 66: warning: exported method KeyCombination.Match should have comment or be unexported (golint)
    • Line 70: warning: exported method KeyMappingConfig.GenerateActionMap should have comment or be unexported (golint)
    • aminal/terminal/terminal.go
    • Line 16: warning: exported const MainBuffer should have comment (or a comment on this block) or be unexported (golint)
    • Line 22: warning: exported type MouseMode should have comment or be unexported (golint)
    • Line 23: warning: exported type MouseExtMode should have comment or be unexported (golint)
    • Line 27: warning: exported const MouseModeNone should have comment (or a comment on this block) or be unexported (golint)
    • Line 38: warning: exported type Terminal should have comment or be unexported (golint)
    • Line 63: warning: exported type Modes should have comment or be unexported (golint)
    • Line 69: warning: exported type Winsize should have comment or be unexported (golint)
    • Line 76: warning: exported function New should have comment or be unexported (golint)
    • Line 100: warning: exported method Terminal.SetProgram should have comment or be unexported (golint)
    • Line 104: warning: exported method Terminal.SetBracketedPasteMode should have comment or be unexported (golint)
    • Line 108: warning: exported method Terminal.CheckDirty should have comment or be unexported (golint)
    • Line 114: warning: exported method Terminal.SetDirty should have comment or be unexported (golint)
    • Line 118: warning: exported method Terminal.IsApplicationCursorKeysModeEnabled should have comment or be unexported (golint)
    • Line 122: warning: exported method Terminal.SetMouseMode should have comment or be unexported (golint)
    • Line 126: warning: exported method Terminal.GetMouseMode should have comment or be unexported (golint)
    • Line 130: warning: exported method Terminal.SetMouseExtMode should have comment or be unexported (golint)
    • Line 134: warning: exported method Terminal.GetMouseExtMode should have comment or be unexported (golint)
    • Line 138: warning: exported method Terminal.IsOSCTerminator should have comment or be unexported (golint)
    • Line 143: warning: exported method Terminal.UseMainBuffer should have comment or be unexported (golint)
    • Line 148: warning: exported method Terminal.UseAltBuffer should have comment or be unexported (golint)
    • Line 153: warning: exported method Terminal.UseInternalBuffer should have comment or be unexported (golint)
    • Line 158: warning: exported method Terminal.ExitInternalBuffer should have comment or be unexported (golint)
    • Line 162: warning: exported method Terminal.ActiveBuffer should have comment or be unexported (golint)
    • Line 166: warning: exported method Terminal.UsingMainBuffer should have comment or be unexported (golint)
    • Line 170: warning: exported method Terminal.GetScrollOffset should have comment or be unexported (golint)
    • Line 174: warning: exported method Terminal.ScreenScrollDown should have comment or be unexported (golint)
    • Line 189: warning: exported method Terminal.SetCharSize should have comment or be unexported (golint)
    • Line 194: warning: exported method Terminal.AreaScrollUp should have comment or be unexported (golint)
    • Line 198: warning: exported method Terminal.AreaScrollDown should have comment or be unexported (golint)
    • Line 202: warning: exported method Terminal.ScreenScrollUp should have comment or be unexported (golint)
    • Line 219: warning: exported method Terminal.ScrollPageDown should have comment or be unexported (golint)
    • Line 223: warning: exported method Terminal.ScrollPageUp should have comment or be unexported (golint)
    • Line 227: warning: exported method Terminal.ScrollToEnd should have comment or be unexported (golint)
    • Line 232: warning: exported method Terminal.GetVisibleLines should have comment or be unexported (golint)
    • Line 236: warning: exported method Terminal.GetCell should have comment or be unexported (golint)
    • Line 240: warning: exported method Terminal.AttachTitleChangeHandler should have comment or be unexported (golint)
    • Line 244: warning: exported method Terminal.AttachResizeHandler should have comment or be unexported (golint)
    • Line 248: warning: exported method Terminal.AttachReverseHandler should have comment or be unexported (golint)
    • Line 252: warning: exported method Terminal.Modes should have comment or be unexported (golint)
    • Line 280: warning: exported method Terminal.GetLogicalCursorX should have comment or be unexported (golint)
    • Line 288: warning: exported method Terminal.GetLogicalCursorY should have comment or be unexported (golint)
    • Line 296: warning: exported method Terminal.GetTitle should have comment or be unexported (golint)
    • Line 300: warning: exported method Terminal.SetTitle should have comment or be unexported (golint)
    • Line 311: warning: exported method Terminal.WriteReturn should have comment or be unexported (golint)
    • Line 314: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 319: warning: exported method Terminal.Paste should have comment or be unexported (golint)
    • Line 349: warning: exported method Terminal.Clear should have comment or be unexported (golint)
    • Line 353: warning: exported method Terminal.GetSize should have comment or be unexported (golint)
    • Line 357: warning: exported method Terminal.SetSize should have comment or be unexported (golint)
    • Line 379: warning: exported method Terminal.SetAutoWrap should have comment or be unexported (golint)
    • Line 383: warning: exported method Terminal.IsAutoWrap should have comment or be unexported (golint)
    • Line 387: warning: exported method Terminal.SetOriginMode should have comment or be unexported (golint)
    • Line 392: warning: exported method Terminal.SetInsertMode should have comment or be unexported (golint)
    • Line 396: warning: exported method Terminal.SetReplaceMode should have comment or be unexported (golint)
    • Line 400: warning: exported method Terminal.SetNewLineMode should have comment or be unexported (golint)
    • Line 404: warning: exported method Terminal.SetLineFeedMode should have comment or be unexported (golint)
    • Line 408: warning: exported method Terminal.ResetVerticalMargins should have comment or be unexported (golint)
    • Line 412: warning: exported method Terminal.SetScreenMode 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!