Preparing report...

Report for github.com/yahoojapan/ngtd

A    Great!    Found 21 issues across 28 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!


gocyclo89%

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.


golint50%

Golint is a linter for Go source code.

    • ngtd/kvs/bolt.go
    • Line 72: warning: exported method BoltDB.GetKey should have comment or be unexported (golint)
    • Line 89: warning: exported method BoltDB.GetVal should have comment or be unexported (golint)
    • Line 111: warning: exported method BoltDB.Set should have comment or be unexported (golint)
    • Line 129: warning: exported method BoltDB.Delete should have comment or be unexported (golint)
    • Line 140: warning: exported method BoltDB.Close should have comment or be unexported (golint)
    • ngtd/handler/grpc.go
    • Line 28: warning: exported type GRPC should have comment or be unexported (golint)
    • Line 30: warning: exported method GRPC.Search should have comment or be unexported (golint)
    • Line 39: warning: exported method GRPC.SearchByID should have comment or be unexported (golint)
    • Line 48: warning: exported method GRPC.StreamSearch should have comment or be unexported (golint)
    • Line 67: warning: exported method GRPC.StreamSearchByID should have comment or be unexported (golint)
    • Line 86: warning: exported method GRPC.Insert should have comment or be unexported (golint)
    • Line 93: warning: exported method GRPC.StreamInsert should have comment or be unexported (golint)
    • Line 108: warning: exported method GRPC.Remove should have comment or be unexported (golint)
    • Line 115: warning: exported method GRPC.StreamRemove should have comment or be unexported (golint)
    • Line 156: warning: exported method GRPC.CreateIndex should have comment or be unexported (golint)
    • Line 163: warning: exported method GRPC.SaveIndex should have comment or be unexported (golint)
    • Line 170: warning: exported method GRPC.GetDimension should have comment or be unexported (golint)
    • ngtd/cmd/ngtd/build/text.go
    • Line 29: warning: exported type TextReader should have comment or be unexported (golint)
    • Line 35: warning: exported function NewTextReader should have comment or be unexported (golint)
    • Line 47: warning: exported method TextReader.Next should have comment or be unexported (golint)
    • Line 52: warning: exported method TextReader.Close should have comment or be unexported (golint)
    • Line 56: warning: exported type TextParser should have comment or be unexported (golint)
    • Line 61: warning: exported function NewTextParser should have comment or be unexported (golint)
    • Line 71: warning: exported method TextParser.Parse should have comment or be unexported (golint)
    • ngtd/ngtd.go
    • Line 51: warning: exported type ServerType should have comment or be unexported (golint)
    • Line 54: warning: exported const HTTP should have comment (or a comment on this block) or be unexported (golint)
    • Line 59: warning: exported var ErrServerAlreadyRunning should have comment or be unexported (golint)
    • Line 89: warning: exported method NGTD.ListenAndServe should have comment or be unexported (golint)
    • Line 157: warning: exported method NGTD.ListenAndServeProfile should have comment or be unexported (golint)
    • Line 161: warning: exported method NGTD.Stop should have comment or be unexported (golint)
    • ngtd/model/model.go
    • Line 19: warning: exported type SearchRequest should have comment or be unexported (golint)
    • Line 26: warning: exported type SearchResult should have comment or be unexported (golint)
    • Line 31: warning: exported type SearchResponse should have comment or be unexported (golint)
    • Line 36: warning: exported type InsertRequest should have comment or be unexported (golint)
    • Line 41: warning: exported type InsertResponse should have comment or be unexported (golint)
    • Line 45: warning: exported type MultiInsertRequest should have comment or be unexported (golint)
    • Line 49: warning: exported type MultiInsertResponse should have comment or be unexported (golint)
    • Line 54: warning: exported type RemoveResponse should have comment or be unexported (golint)
    • Line 58: warning: exported type MultiRemoveRequest should have comment or be unexported (golint)
    • Line 62: warning: exported type MultiRemoveResponse should have comment or be unexported (golint)
    • Line 67: warning: exported type GetObjectsRequest should have comment or be unexported (golint)
    • Line 71: warning: exported type GetObjectResult should have comment or be unexported (golint)
    • Line 76: warning: exported type GetObjectsResponse should have comment or be unexported (golint)
    • Line 81: warning: exported type ErrorResponse should have comment or be unexported (golint)
    • Line 87: warning: exported type DefaultResponse should have comment or be unexported (golint)
    • ngtd/ngtdtest/database.go
    • Line 32: warning: exported function CreateDB should have comment or be unexported (golint)
    • Line 62: warning: exported function DeleteDB should have comment or be unexported (golint)
    • ngtd/ngtdtest/map.go
    • Line 19: warning: exported type Map should have comment or be unexported (golint)
    • Line 24: warning: exported function NewMap should have comment or be unexported (golint)
    • Line 31: warning: exported method Map.GetVal should have comment or be unexported (golint)
    • Line 35: warning: exported method Map.GetKey should have comment or be unexported (golint)
    • Line 48: warning: exported method Map.Set should have comment or be unexported (golint)
    • Line 54: warning: exported method Map.Delete should have comment or be unexported (golint)
    • Line 62: warning: exported method Map.Close should have comment or be unexported (golint)
    • ngtd/kvs/redis.go
    • Line 40: warning: exported type Redis should have comment or be unexported (golint)
    • Line 90: warning: exported method Redis.GetKey should have comment or be unexported (golint)
    • Line 126: warning: exported method Redis.GetVal should have comment or be unexported (golint)
    • Line 136: warning: exported method Redis.Set should have comment or be unexported (golint)
    • Line 152: warning: exported method Redis.Delete should have comment or be unexported (golint)
    • Line 171: warning: exported method Redis.Close should have comment or be unexported (golint)
    • ngtd/handler/http.go
    • Line 35: warning: exported function Index should have comment or be unexported (golint)
    • Line 39: warning: exported function Search should have comment or be unexported (golint)
    • Line 67: warning: exported function SearchByID should have comment or be unexported (golint)
    • Line 95: warning: exported function Insert should have comment or be unexported (golint)
    • Line 124: warning: exported function MultiInsert should have comment or be unexported (golint)
    • Line 162: warning: exported function Remove should have comment or be unexported (golint)
    • Line 182: warning: exported function MultiRemove should have comment or be unexported (golint)
    • Line 220: warning: exported function CreateIndex should have comment or be unexported (golint)
    • Line 249: warning: exported function SaveIndex should have comment or be unexported (golint)
    • Line 269: warning: exported function GetErrors should have comment or be unexported (golint)
    • Line 280: warning: exported function GetDimension should have comment or be unexported (golint)
    • Line 326: warning: exported function ErrorResponse should have comment or be unexported (golint)
    • ngtd/service/service.go
    • Line 28: warning: exported type Service should have comment or be unexported (golint)
    • Line 32: warning: exported type SearchResult should have comment or be unexported (golint)
    • Line 38: warning: exported type GetObjectResult should have comment or be unexported (golint)
    • Line 52: warning: exported function Get should have comment or be unexported (golint)
    • Line 59: warning: exported method Service.SetDB should have comment or be unexported (golint)
    • Line 63: warning: exported function SetDB should have comment or be unexported (golint)
    • Line 67: warning: exported function NewService should have comment or be unexported (golint)
    • Line 73: warning: exported function Search should have comment or be unexported (golint)
    • Line 77: warning: exported method Service.Search should have comment or be unexported (golint)
    • Line 102: warning: exported function SearchByID should have comment or be unexported (golint)
    • Line 106: warning: exported method Service.SearchByID should have comment or be unexported (golint)
    • Line 122: warning: exported function Insert should have comment or be unexported (golint)
    • Line 126: warning: exported method Service.Insert should have comment or be unexported (golint)
    • Line 139: warning: exported function Remove should have comment or be unexported (golint)
    • Line 143: warning: exported method Service.Remove should have comment or be unexported (golint)
    • Line 156: warning: exported function GetObject should have comment or be unexported (golint)
    • Line 160: warning: exported method Service.GetObject should have comment or be unexported (golint)
    • ngtd/kvs/golevel.go
    • Line 25: warning: exported type GoLevel should have comment or be unexported (golint)
    • Line 30: warning: exported function NewGoLevel should have comment or be unexported (golint)
    • Line 46: warning: exported method GoLevel.GetKey should have comment or be unexported (golint)
    • Line 63: warning: exported method GoLevel.GetVal should have comment or be unexported (golint)
    • Line 71: warning: exported method GoLevel.Set should have comment or be unexported (golint)
    • Line 79: warning: exported method GoLevel.Delete should have comment or be unexported (golint)
    • Line 90: warning: exported method GoLevel.Close 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!