Preparing report...

Report for github.com/nemith/goline

B    Not bad!    Found 7 issues across 8 files

Tweet

gofmt75%

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!


golint50%

Golint is a linter for Go source code.

    • goline/history.go
    • Line 5: warning: exported type History should have comment or be unexported (golint)
    • Line 10: warning: exported method History.PreviousHistory should have comment or be unexported (golint)
    • Line 21: warning: exported method History.NextHistory should have comment or be unexported (golint)
    • Line 34: warning: exported method History.AddLine should have comment or be unexported (golint)
    • Line 41: warning: exported method History.HistoryFinish should have comment or be unexported (golint)
    • Line 46: warning: exported function SetupHistory should have comment or be unexported (golint)
    • goline/terminal.go
    • Line 47: warning: comment on exported function GetTermios should be of the form "GetTermios ..." (golint)
    • Line 62: warning: comment on exported function SetTermios should be of the form "SetTermios ..." (golint)
    • Line 76: warning: comment on exported function IsTerminal should be of the form "IsTerminal ..." (golint)
    • Line 85: warning: comment on exported type Tty should be of the form "Tty ..." (with optional leading article) (golint)
    • Line 93: warning: comment on exported function NewTty should be of the form "NewTty ..." (golint)
    • Line 103: warning: comment on exported method Tty.EnableRawMode should be of the form "EnableRawMode ..." (golint)
    • Line 132: warning: comment on exported method Tty.DisableRawMode should be of the form "DisableRawMode ..." (golint)
    • Line 154: warning: comment on exported method Tty.WriteString should be of the form "WriteString ..." (golint)
    • Line 160: warning: exported method Tty.ReadRune should have comment or be unexported (golint)
    • Line 199: warning: comment on exported method Tty.ReadChar should be of the form "ReadChar ..." (golint)
    • Line 211: warning: comment on exported method Tty.ReadChars should be of the form "ReadChars ..." (golint)
    • goline/goline.go
    • Line 10: warning: exported const MAX_LINE should have comment (or a comment on this block) or be unexported (golint)
    • Line 13: warning: comment on exported var UserTerminatedError should be of the form "UserTerminatedError ..." (golint)
    • Line 15: warning: error var UserTerminatedError should have name of the form ErrFoo (golint)
    • Line 23: warning: comment on exported type StringPrompt should be of the form "StringPrompt ..." (with optional leading article) (golint)
    • Line 26: warning: comment on exported method StringPrompt.Prompt should be of the form "Prompt ..." (golint)
    • Line 31: warning: exported type Handler should have comment or be unexported (golint)
    • Line 46: warning: comment on exported function NewGoLine should be of the form "NewGoLine ..." (golint)
    • Line 89: warning: comment on exported method GoLine.RefreshLine should be of the form "RefreshLine ..." (golint)
    • Line 109: warning: comment on exported method GoLine.InsertRune should be of the form "InsertRune ..." (golint)
    • Line 126: warning: comment on exported method GoLine.ClearScreen should be of the form "ClearScreen ..." (golint)
    • Line 131: warning: comment on exported method GoLine.AddHandler should be of the form "AddHandler ..." (golint)
    • Line 149: warning: comment on exported method GoLine.RemoveHandler should be of the form "RemoveHandler ..." (golint)
    • Line 161: warning: comment on exported method GoLine.Line should be of the form "Line ..." (golint)
    • goline/handlers.go
    • Line 23: warning: exported function Finish should have comment or be unexported (golint)
    • Line 27: warning: exported function UserTerminated should have comment or be unexported (golint)
    • Line 31: warning: exported function Backspace should have comment or be unexported (golint)
    • Line 41: warning: exported function MoveBackOneWord should have comment or be unexported (golint)
    • Line 46: warning: exported function MoveForwardOneWord should have comment or be unexported (golint)
    • Line 51: warning: exported function MoveLeft should have comment or be unexported (golint)
    • Line 58: warning: exported function MoveRight should have comment or be unexported (golint)
    • Line 65: warning: exported function DeleteLine should have comment or be unexported (golint)
    • Line 72: warning: exported function DeleteRestofLine should have comment or be unexported (golint)
    • Line 78: warning: exported function DeleteLastWord should have comment or be unexported (golint)
    • Line 79: warning: don't use underscores in Go names; var prev_position should be prevPosition (golint)
    • Line 86: warning: exported function DeleteNextWord should have comment or be unexported (golint)
    • Line 93: warning: exported function DeleteCurrentChar should have comment or be unexported (golint)
    • Line 101: warning: exported function SwapWithPreviousChar should have comment or be unexported (golint)
    • Line 115: warning: exported function MoveStartofLine should have comment or be unexported (golint)
    • Line 120: warning: exported function MoveEndofLine should have comment or be unexported (golint)
    • Line 125: warning: exported function ClearScreen should have comment or be unexported (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!