Preparing report...

Report for github.com/simeji/jid

A    Great!    Found 9 issues across 11 files

Tweet

gofmt81%

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!


gocyclo72%

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.

    • jid/engine.go
    • Line 90: warning: cyclomatic complexity 31 of function (*Engine).Run() is high (> 15) (gocyclo)
    • jid/query.go
    • Line 130: warning: cyclomatic complexity 17 of function (*Query).GetKeywords() is high (> 15) (gocyclo)

golint45%

Golint is a linter for Go source code.

    • jid/terminal.go
    • Line 14: warning: exported type Terminal should have comment or be unexported (golint)
    • Line 22: warning: exported type TerminalDrawAttributes should have comment or be unexported (golint)
    • Line 32: warning: exported function NewTerminal should have comment or be unexported (golint)
    • Line 46: warning: exported method Terminal.Draw should have comment or be unexported (golint)
    • jid/engine.go
    • Line 11: warning: exported const DefaultY should have comment (or a comment on this block) or be unexported (golint)
    • Line 15: warning: exported type EngineInterface should have comment or be unexported (golint)
    • Line 20: warning: exported type EngineResultInterface should have comment or be unexported (golint)
    • Line 26: warning: exported type Engine should have comment or be unexported (golint)
    • Line 41: warning: exported type EngineAttribute should have comment or be unexported (golint)
    • Line 47: warning: exported function NewEngine should have comment or be unexported (golint)
    • Line 69: warning: exported type EngineResult should have comment or be unexported (golint)
    • Line 75: warning: exported method EngineResult.GetQueryString should have comment or be unexported (golint)
    • Line 79: warning: exported method EngineResult.GetContent should have comment or be unexported (golint)
    • Line 82: warning: exported method EngineResult.GetError should have comment or be unexported (golint)
    • Line 86: warning: exported method Engine.GetQuery should have comment or be unexported (golint)
    • Line 90: warning: exported method Engine.Run should have comment or be unexported (golint)
    • jid/json_manager.go
    • Line 13: warning: exported type JsonManager should have comment or be unexported (golint)
    • Line 19: warning: exported function NewJsonManager should have comment or be unexported (golint)
    • Line 41: warning: exported method JsonManager.Get should have comment or be unexported (golint)
    • Line 44: warning: don't use underscores in Go names; var enc_err should be encErr (golint)
    • Line 53: warning: exported method JsonManager.GetPretty should have comment or be unexported (golint)
    • Line 62: warning: exported method JsonManager.GetFilteredData should have comment or be unexported (golint)
    • Line 100: warning: exported method JsonManager.GetCandidateKeys should have comment or be unexported (golint)
    • jid/query.go
    • Line 10: warning: exported type QueryInterface should have comment or be unexported (golint)
    • Line 32: warning: exported type Query should have comment or be unexported (golint)
    • Line 37: warning: exported function NewQuery should have comment or be unexported (golint)
    • Line 45: warning: exported function NewQueryWithString should have comment or be unexported (golint)
    • Line 49: warning: exported method Query.Get should have comment or be unexported (golint)
    • Line 53: warning: exported method Query.GetChar should have comment or be unexported (golint)
    • Line 62: warning: exported method Query.Length should have comment or be unexported (golint)
    • Line 66: warning: exported method Query.IndexOffset should have comment or be unexported (golint)
    • Line 76: warning: exported method Query.Set should have comment or be unexported (golint)
    • Line 83: warning: exported method Query.Insert should have comment or be unexported (golint)
    • Line 95: warning: exported method Query.StringInsert should have comment or be unexported (golint)
    • Line 99: warning: exported method Query.Add should have comment or be unexported (golint)
    • Line 103: warning: exported method Query.Delete should have comment or be unexported (golint)
    • Line 126: warning: exported method Query.Clear should have comment or be unexported (golint)
    • Line 130: warning: exported method Query.GetKeywords should have comment or be unexported (golint)
    • Line 185: warning: exported method Query.GetLastKeyword should have comment or be unexported (golint)
    • Line 193: warning: exported method Query.StringGetLastKeyword should have comment or be unexported (golint)
    • Line 197: warning: exported method Query.PopKeyword should have comment or be unexported (golint)
    • Line 216: warning: exported method Query.StringGet should have comment or be unexported (golint)
    • Line 220: warning: exported method Query.StringSet should have comment or be unexported (golint)
    • Line 224: warning: exported method Query.StringAdd should have comment or be unexported (golint)
    • Line 228: warning: exported method Query.StringGetKeywords should have comment or be unexported (golint)
    • Line 236: warning: exported method Query.StringPopKeyword should have comment or be unexported (golint)
    • jid/suggestion.go
    • Line 11: warning: exported type SuggestionInterface should have comment or be unexported (golint)
    • Line 16: warning: exported type SuggestionDataType should have comment or be unexported (golint)
    • Line 19: warning: exported const UNKNOWN should have comment (or a comment on this block) or be unexported (golint)
    • Line 27: warning: exported type Suggestion should have comment or be unexported (golint)
    • Line 30: warning: exported function NewSuggestion should have comment or be unexported (golint)
    • Line 34: warning: exported method Suggestion.Get should have comment or be unexported (golint)
    • Line 71: warning: should omit 2nd value from range; this loop is equivalent to `for i := range ...` (golint)
    • Line 90: warning: exported method Suggestion.GetCandidateKeys should have comment or be unexported (golint)
    • Line 141: warning: exported method Suggestion.GetCurrentType should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign63%

IneffAssign detects ineffectual assignments in Go code.

    • jid/json_manager_test.go
    • Line 62: warning: ineffectual assignment to candidateKeys (ineffassign)
    • Line 70: warning: ineffectual assignment to candidateKeys (ineffassign)
    • Line 77: warning: ineffectual assignment to suggest (ineffassign)
    • Line 77: warning: ineffectual assignment to candidateKeys (ineffassign)
    • Line 77: warning: ineffectual assignment to err (ineffassign)
    • Line 82: warning: ineffectual assignment to suggest (ineffassign)
    • Line 82: warning: ineffectual assignment to candidateKeys (ineffassign)
    • Line 88: warning: ineffectual assignment to candidateKeys (ineffassign)
    • Line 95: warning: ineffectual assignment to candidateKeys (ineffassign)
    • Line 107: warning: ineffectual assignment to candidateKeys (ineffassign)
    • Line 229: warning: ineffectual assignment to c (ineffassign)
    • Line 237: warning: ineffectual assignment to c (ineffassign)
    • Line 245: warning: ineffectual assignment to c (ineffassign)
    • Line 253: warning: ineffectual assignment to c (ineffassign)
    • Line 261: warning: ineffectual assignment to c (ineffassign)
    • Line 269: warning: ineffectual assignment to c (ineffassign)
    • Line 329: warning: ineffectual assignment to err (ineffassign)
    • Line 330: warning: ineffectual assignment to d (ineffassign)

misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!