Preparing report...

Report for github.com/japanoise/gomacs

A    Great!    Found 17 issues across 26 files

Tweet

gofmt96%

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!


golint34%

Golint is a linter for Go source code.

    • gomacs/macro.go
    • Line 7: warning: exported type EditorAction should have comment or be unexported (golint)
    • Line 13: warning: exported type EditorMacro should have comment or be unexported (golint)
    • gomacs/nav.go
    • Line 42: warning: exported method EditorBuffer.UpdateRowToPrefCX should have comment or be unexported (golint)
    • Line 51: warning: exported method EditorBuffer.MoveCursorToEndOfBuffer should have comment or be unexported (golint)
    • Line 57: warning: exported method EditorBuffer.MoveCursorDown should have comment or be unexported (golint)
    • Line 69: warning: exported method EditorBuffer.MoveCursorUp should have comment or be unexported (golint)
    • Line 81: warning: exported method EditorBuffer.MoveCursorLeft should have comment or be unexported (golint)
    • Line 99: warning: exported method EditorBuffer.MoveCursorRight should have comment or be unexported (golint)
    • Line 120: warning: exported function MoveCursorToEol should have comment or be unexported (golint)
    • Line 127: warning: exported function MoveCursorToBol should have comment or be unexported (golint)
    • Line 132: warning: exported function MovePage should have comment or be unexported (golint)
    • Line 142: warning: exported function MoveCursorBackPage should have comment or be unexported (golint)
    • Line 169: warning: exported function MoveCursorForthPage should have comment or be unexported (golint)
    • Line 197: warning: don't use underscores in Go names; var last_match should be lastMatch (golint)
    • Line 226: warning: should omit values from range; this loop is equivalent to `for range ...` (golint)
    • Line 251: warning: don't use underscores in Go names; var saved_cx should be savedCx (golint)
    • Line 252: warning: don't use underscores in Go names; var saved_cy should be savedCy (golint)
    • Line 253: warning: don't use underscores in Go names; var saved_ro should be savedRo (golint)
    • gomacs/registers.go
    • Line 11: warning: exported type RegisterType should have comment or be unexported (golint)
    • Line 14: warning: exported const RegisterInvalid should have comment (or a comment on this block) or be unexported (golint)
    • Line 21: warning: exported type Register should have comment or be unexported (golint)
    • Line 30: warning: exported type RegisterList should have comment or be unexported (golint)
    • Line 121: warning: exported function InteractiveGetRegister should have comment or be unexported (golint)
    • Line 129: warning: exported function DoJumpRegister should have comment or be unexported (golint)
    • Line 142: warning: exported function DoSavePositionToRegister should have comment or be unexported (golint)
    • Line 147: warning: exported function DoSaveMacroToRegister should have comment or be unexported (golint)
    • Line 152: warning: exported function DoSaveTextToRegister should have comment or be unexported (golint)
    • Line 157: warning: exported function DoInsertTextFromRegister should have comment or be unexported (golint)
    • Line 172: warning: exported function DoDescribeRegister should have comment or be unexported (golint)
    • Line 210: warning: exported function NewRegisterList should have comment or be unexported (golint)
    • gomacs/render.go
    • Line 40: warning: don't use underscores in Go names; var cur_rx should be curRx (golint)
    • Line 44: warning: don't use underscores in Go names; var cur_rx should be curRx (golint)
    • Line 161: warning: exported function GetScreenSize should have comment or be unexported (golint)
    • Line 247: warning: exported function NumStrWidth should have comment or be unexported (golint)
    • Line 251: warning: exported function GetGutterWidth should have comment or be unexported (golint)
    • Line 255: warning: exported function LineNrToString should have comment or be unexported (golint)
    • gomacs/shell.go
    • Line 77: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • gomacs/lisp.go
    • Line 108: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 215: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 259: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 616: warning: exported function NewLispInterp should have comment or be unexported (golint)
    • Line 626: warning: exported function LoadUserConfig should have comment or be unexported (golint)
    • Line 652: warning: exported function LoadDefaultConfig should have comment or be unexported (golint)
    • gomacs/modes.go
    • Line 7: warning: comment on exported type ModeList should be of the form "ModeList ..." (with optional leading article) (golint)
    • Line 17: warning: exported method EditorBuffer.AddDefaultModes should have comment or be unexported (golint)
    • Line 77: warning: comment on exported type Hooks should be of the form "Hooks ..." (with optional leading article) (golint)
    • Line 83: warning: exported type HookList should have comment or be unexported (golint)
    • Line 90: warning: exported function ExecHooksForMode should have comment or be unexported (golint)
    • Line 102: warning: exported function RegisterGoHookForMode should have comment or be unexported (golint)
    • Line 113: warning: exported function RegisterLispHookForMode should have comment or be unexported (golint)
    • Line 125: warning: exported function RegisterGoSaveHookForMode should have comment or be unexported (golint)
    • Line 129: warning: exported function RegisterLispSaveHookForMode should have comment or be unexported (golint)
    • Line 133: warning: exported function ExecSaveHooksForMode should have comment or be unexported (golint)
    • Line 137: warning: exported function BindKeyMajorMode should have comment or be unexported (golint)
    • gomacs/main.go
    • Line 24: warning: exported const TIMEOUT should have comment or be unexported (golint)
    • Line 26: warning: exported type EditorRow should have comment or be unexported (golint)
    • Line 37: warning: exported type EditorBuffer should have comment or be unexported (golint)
    • Line 62: warning: exported type EditorState should have comment or be unexported (golint)
    • Line 90: warning: exported var Global should have comment or be unexported (golint)
    • Line 91: warning: exported var Emacs should have comment or be unexported (golint)
    • Line 339: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 369: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 396: warning: exported function AbsPath should have comment or be unexported (golint)
    • Line 411: warning: exported function EditorOpen should have comment or be unexported (golint)
    • Line 432: warning: exported method EditorBuffer.UpdateRenderName should have comment or be unexported (golint)
    • Line 462: warning: exported function EditorSave should have comment or be unexported (golint)
    • Line 474: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 510: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 515: warning: exported function InitEditor should have comment or be unexported (golint)
    • Line 542: warning: exported function RunCommandForKey should have comment or be unexported (golint)
    • Line 581: warning: exported function AddErrorMessage should have comment or be unexported (golint)
    • Line 585: warning: exported function SetUniversalArgument should have comment or be unexported (golint)
    • Line 621: warning: exported function RepeatCommand should have comment or be unexported (golint)
    • Line 642: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 745: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • gomacs/syntax.go
    • Line 14: warning: comment on exported method EditorBuffer.Line should be of the form "Line ..." (golint)
    • Line 19: warning: exported method EditorBuffer.LinesNum should have comment or be unexported (golint)
    • Line 23: warning: exported method EditorBuffer.State should have comment or be unexported (golint)
    • Line 27: warning: exported method EditorBuffer.SetState should have comment or be unexported (golint)
    • Line 31: warning: exported method EditorBuffer.SetMatch should have comment or be unexported (golint)
    • Line 37: warning: exported method EditorBuffer.Highlight should have comment or be unexported (golint)
    • Line 73: warning: exported method EditorRow.PrintWCursor should have comment or be unexported (golint)
    • Line 121: warning: exported method EditorRow.Print should have comment or be unexported (golint)
    • Line 167: warning: exported function LoadSyntaxDefs should have comment or be unexported (golint)
    • gomacs/commands.go
    • Line 13: warning: exported type CommandList should have comment or be unexported (golint)
    • Line 21: warning: exported type CommandFunc should have comment or be unexported (golint)
    • Line 43: warning: exported function WalkCommandTree should have comment or be unexported (golint)
    • Line 47: warning: exported function DefineCommand should have comment or be unexported (golint)
    • Line 51: warning: exported method CommandList.PutCommand should have comment or be unexported (golint)
    • Line 85: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 90: warning: exported method CommandList.GetCommand should have comment or be unexported (golint)
    • Line 102: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 107: warning: exported method CommandList.UnbindAll should have comment or be unexported (golint)
    • Line 121: warning: exported function DescribeKeyBriefly should have comment or be unexported (golint)
    • Line 152: warning: exported function RunCommand should have comment or be unexported (golint)
    • Line 173: warning: exported function RunNamedCommand should have comment or be unexported (golint)
    • Line 186: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 191: warning: exported method CommandFunc.Run should have comment or be unexported (golint)
    • Line 203: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 208: warning: exported function StrToCmdName should have comment or be unexported (golint)
    • Line 212: warning: exported function AproposCommand should have comment or be unexported (golint)
    • Line 233: warning: exported function LoadDefaultCommands should have comment or be unexported (golint)
    • gomacs/input.go
    • Line 12: warning: exported function InitTerm should have comment or be unexported (golint)
    • Line 86: warning: comment on exported function PromptWithCallback should be of the form "PromptWithCallback ..." (golint)
    • Line 90: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 98: warning: comment on exported function DynamicPromptWithCallback should be of the form "DynamicPromptWithCallback ..." (golint)
    • Line 351: warning: exported function ParseTermboxEvent should have comment or be unexported (golint)
    • Line 355: warning: exported function ParseMouseEvent should have comment or be unexported (golint)
    • Line 377: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 390: warning: exported function GetRawChar should have comment or be unexported (golint)
    • Line 396: warning: exported function InsertRaw should have comment or be unexported (golint)
    • gomacs/mouse.go
    • Line 10: warning: exported const GomacsMouseNone should have comment (or a comment on this block) or be unexported (golint)
    • Line 62: warning: exported function JumpToMousePoint should have comment or be unexported (golint)
    • Line 80: warning: exported function MouseDragRegion should have comment or be unexported (golint)
    • Line 98: warning: exported function MouseScrollUp should have comment or be unexported (golint)
    • Line 110: warning: exported function MouseScrollDown should have comment or be unexported (golint)
    • Line 122: warning: exported function MouseRelease should have comment or be unexported (golint)
    • Line 127: warning: exported function MouseYankXsel should have comment or be unexported (golint)
    • gomacs/region.go
    • Line 12: warning: exported type Region should have comment or be unexported (golint)
    • Line 17: warning: exported function NewRegion should have comment or be unexported (golint)
    • Line 148: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 171: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 184: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 403: warning: exported function FillString should have comment or be unexported (golint)
    • Line 444: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • gomacs/undo.go
    • Line 9: warning: exported type EditorUndo should have comment or be unexported (golint)
    • Line 153: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 170: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • gomacs/window.go
    • Line 392: warning: exported function KillBufferAndWindow should have comment or be unexported (golint)

gocyclo92%

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.

    • gomacs/input.go
    • Line 106: warning: cyclomatic complexity 51 of function EditDynamicWithCallback() is high (> 15) (gocyclo)
    • Line 293: warning: cyclomatic complexity 18 of function tabCompletedEditorPrompt() is high (> 15) (gocyclo)
    • gomacs/syntax.go
    • Line 73: warning: cyclomatic complexity 27 of function (*EditorRow).PrintWCursor() is high (> 15) (gocyclo)
    • Line 121: warning: cyclomatic complexity 25 of function (*EditorRow).Print() is high (> 15) (gocyclo)

ineffassign92%

IneffAssign detects ineffectual assignments in Go code.

    • gomacs/input.go
    • Line 65: warning: ineffectual assignment to r (ineffassign)
    • Line 76: warning: ineffectual assignment to r (ineffassign)
    • Line 183: warning: ineffectual assignment to buflen (ineffassign)
    • Line 183: warning: ineffectual assignment to bufpos (ineffassign)
    • Line 183: warning: ineffectual assignment to cursor (ineffassign)
    • Line 194: warning: ineffectual assignment to buflen (ineffassign)
    • Line 203: warning: ineffectual assignment to buflen (ineffassign)
    • Line 219: warning: ineffectual assignment to buflen (ineffassign)
    • Line 241: warning: ineffectual assignment to buflen (ineffassign)
    • Line 249: warning: ineffectual assignment to buflen (ineffassign)
    • Line 257: warning: ineffectual assignment to buflen (ineffassign)
    • Line 281: warning: ineffectual assignment to buflen (ineffassign)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


misspell96%

Misspell Finds commonly misspelled English words

    • gomacs/nav.go
    • Line 354: warning: "occurences" is a misspelling of "occurrences" (misspell)
    • Line 455: warning: "occurences" is a misspelling of "occurrences" (misspell)