Preparing report...

Report for github.com/AlecAivazis/survey

A+    Excellent!    Found 45 issues across 69 files

Tweet

gofmt97%

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!


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.


golint69%

Golint is a linter for Go source code.

    • survey/terminal/cursor.go
    • Line 14: warning: exported var COORDINATE_SYSTEM_BEGIN should have comment or be unexported (golint)
    • Line 18: warning: exported type Cursor should have comment or be unexported (golint)
    • Line 85: warning: comment on exported method Cursor.MoveNextLine should be of the form "MoveNextLine ..." (golint)
    • Line 156: warning: exported method Coord.CursorIsAtLineEnd should have comment or be unexported (golint)
    • Line 160: warning: exported method Coord.CursorIsAtLineBegin should have comment or be unexported (golint)
    • survey/terminal/display.go
    • Line 3: warning: exported type EraseLineMode should have comment or be unexported (golint)
    • Line 6: warning: exported const ERASE_LINE_END should have comment (or a comment on this block) or be unexported (golint)
    • survey/terminal/runereader_posix.go
    • Line 41: warning: exported method RuneReader.Buffer should have comment or be unexported (golint)
    • Line 45: warning: comment on exported method RuneReader.SetTermMode should be of the form "SetTermMode ..." (golint)
    • Line 61: warning: exported method RuneReader.RestoreTermMode should have comment or be unexported (golint)
    • survey/core/template.go
    • Line 14: warning: exported var TemplateFuncsWithColor should have comment or be unexported (golint)
    • Line 19: warning: exported var TemplateFuncsNoColor should have comment or be unexported (golint)
    • survey/confirm.go
    • Line 16: warning: comment on exported type ConfirmTemplateData should be of the form "ConfirmTemplateData ..." (with optional leading article) (golint)
    • Line 24: warning: comment on exported var ConfirmQuestionTemplate should be of the form "ConfirmQuestionTemplate ..." (golint)
    • survey/multiselect.go
    • Line 38: warning: comment on exported type MultiSelectTemplateData should be of the form "MultiSelectTemplateData ..." (with optional leading article) (golint)
    • Line 62: warning: exported var MultiSelectQuestionTemplate should have comment or be unexported (golint)
    • Line 221: warning: exported method MultiSelect.Prompt should have comment or be unexported (golint)
    • survey/terminal/runereader.go
    • Line 10: warning: exported type RuneReader should have comment or be unexported (golint)
    • Line 16: warning: exported function NewRuneReader should have comment or be unexported (golint)
    • Line 34: warning: exported type OnRuneFn should have comment or be unexported (golint)
    • Line 36: warning: exported method RuneReader.ReadLine should have comment or be unexported (golint)
    • Line 40: warning: exported method RuneReader.ReadLineWithDefault should have comment or be unexported (golint)
    • survey/terminal/terminal.go
    • Line 3: warning: exported type Short should have comment or be unexported (golint)
    • Line 5: warning: exported type Coord should have comment or be unexported (golint)
    • survey/editor.go
    • Line 38: warning: comment on exported type EditorTemplateData should be of the form "EditorTemplateData ..." (with optional leading article) (golint)
    • Line 47: warning: comment on exported var EditorQuestionTemplate should be of the form "EditorQuestionTemplate ..." (golint)
    • Line 76: warning: exported method Editor.PromptAgain should have comment or be unexported (golint)
    • Line 81: warning: exported method Editor.Prompt should have comment or be unexported (golint)
    • Line 212: warning: exported method Editor.Cleanup should have comment or be unexported (golint)
    • survey/password.go
    • Line 25: warning: exported type PasswordTemplateData should have comment or be unexported (golint)
    • Line 38: warning: exported method Password.Prompt should have comment or be unexported (golint)
    • Line 99: warning: receiver name prompt should be consistent with previous receiver name p for Password (golint)
    • survey/terminal/error.go
    • Line 8: warning: error var InterruptErr should have name of the form ErrFoo (golint)
    • Line 8: warning: exported var InterruptErr should have comment or be unexported (golint)
    • survey/core/write.go
    • Line 32: warning: exported function OptionAnswerList should have comment or be unexported (golint)
    • Line 40: warning: exported function WriteAnswer should have comment or be unexported (golint)
    • survey/renderer.go
    • Line 13: warning: exported type Renderer should have comment or be unexported (golint)
    • Line 19: warning: exported type ErrorTemplateData should have comment or be unexported (golint)
    • Line 24: warning: exported var ErrorTemplate should have comment or be unexported (golint)
    • Line 27: warning: exported method Renderer.WithStdio should have comment or be unexported (golint)
    • Line 31: warning: exported method Renderer.Stdio should have comment or be unexported (golint)
    • Line 35: warning: exported method Renderer.NewRuneReader should have comment or be unexported (golint)
    • Line 39: warning: exported method Renderer.NewCursor should have comment or be unexported (golint)
    • Line 72: warning: exported method Renderer.OffsetCursor should have comment or be unexported (golint)
    • Line 80: warning: exported method Renderer.Render should have comment or be unexported (golint)
    • Line 102: warning: exported method Renderer.RenderWithCursorOffset should have comment or be unexported (golint)
    • survey/tests/util/test.go
    • Line 1: warning: don't use MixedCaps in package name; TestUtil should be testutil (golint)
    • Line 10: warning: exported type TestTableEntry should have comment or be unexported (golint)
    • Line 23: warning: exported function RunTable should have comment or be unexported (golint)
    • Line 39: warning: exported function RunErrorTable should have comment or be unexported (golint)
    • survey/input.go
    • Line 31: warning: comment on exported type InputTemplateData should be of the form "InputTemplateData ..." (with optional leading article) (golint)
    • Line 42: warning: comment on exported var InputQuestionTemplate should be of the form "InputQuestionTemplate ..." (golint)
    • Line 137: warning: error var readLineAgain should have name of the form errFoo (golint)
    • Line 139: warning: exported method Input.Prompt should have comment or be unexported (golint)
    • Line 208: warning: exported method Input.Cleanup should have comment or be unexported (golint)
    • survey/multiline.go
    • Line 9: warning: exported type Multiline should have comment or be unexported (golint)
    • Line 16: warning: comment on exported type MultilineTemplateData should be of the form "MultilineTemplateData ..." (with optional leading article) (golint)
    • Line 25: warning: comment on exported var MultilineQuestionTemplate should be of the form "MultilineQuestionTemplate ..." (golint)
    • Line 38: warning: exported method Multiline.Prompt should have comment or be unexported (golint)
    • Line 100: warning: exported method Multiline.Cleanup should have comment or be unexported (golint)
    • survey/select.go
    • Line 60: warning: exported var SelectQuestionTemplate should have comment or be unexported (golint)
    • Line 215: warning: exported method Select.Prompt should have comment or be unexported (golint)
    • Line 335: warning: exported method Select.Cleanup should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign68%

IneffAssign detects ineffectual assignments in Go code.

    • survey/tests/confirm.go
    • Line 41: warning: main redeclared in this block (ineffassign)
    • Line 8: warning: other declaration of answer (ineffassign)
    • Line 10: warning: other declaration of goodTable (ineffassign)
    • Line 10: warning: other declaration of goodTable (ineffassign)
    • Line 8: warning: other declaration of answer (ineffassign)
    • Line 8: warning: other declaration of answer (ineffassign)
    • Line 10: warning: other declaration of goodTable (ineffassign)
    • survey/tests/select.go
    • Line 8: warning: answer redeclared in this block (ineffassign)
    • Line 10: warning: goodTable redeclared in this block (ineffassign)
    • Line 70: warning: main redeclared in this block (ineffassign)
    • survey/tests/editor.go
    • Line 11: warning: answer redeclared in this block (ineffassign)
    • Line 13: warning: goodTable redeclared in this block (ineffassign)
    • Line 57: warning: main redeclared in this block (ineffassign)
    • survey/tests/ask.go
    • Line 34: warning: other declaration of main (ineffassign)
    • Line 10: warning: other declaration of simpleQs (ineffassign)
    • Line 34: warning: other declaration of main (ineffassign)
    • Line 34: warning: other declaration of main (ineffassign)
    • Line 34: warning: other declaration of main (ineffassign)
    • Line 34: warning: other declaration of main (ineffassign)
    • Line 34: warning: other declaration of main (ineffassign)
    • Line 34: warning: other declaration of main (ineffassign)
    • Line 34: warning: other declaration of main (ineffassign)
    • Line 34: warning: other declaration of main (ineffassign)
    • Line 10: warning: other declaration of simpleQs (ineffassign)
    • Line 34: warning: other declaration of main (ineffassign)
    • survey/examples/cursor.go
    • Line 20: warning: main redeclared in this block (ineffassign)
    • Line 10: warning: other declaration of simpleQs (ineffassign)
    • Line 10: warning: other declaration of simpleQs (ineffassign)
    • Line 10: warning: other declaration of simpleQs (ineffassign)
    • survey/examples/countrylist.go
    • Line 265: warning: other declaration of main (ineffassign)
    • Line 265: warning: other declaration of main (ineffassign)
    • Line 265: warning: other declaration of main (ineffassign)
    • Line 265: warning: other declaration of main (ineffassign)
    • Line 265: warning: other declaration of main (ineffassign)
    • Line 265: warning: other declaration of main (ineffassign)
    • Line 265: warning: other declaration of main (ineffassign)
    • Line 265: warning: other declaration of main (ineffassign)

misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!