Preparing report...

Report for github.com/vdaas/vald

(v1.6.3)

A+    Excellent!    Found 61 issues across 858 files

Tweet

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!


gofmt100%

Gofmt formats Go programs. We run gofmt -s on your code, where -s is for the "simplify" command

No problems detected. Good job!


ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

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.

    • pkg/gateway/lb/handler/grpc/handler.go
    • Line 415: warning: cyclomatic complexity 60 of function (*server).search() is high (> 15) (gocyclo)
    • Line 2432: warning: cyclomatic complexity 30 of function (*server).MultiUpsert() is high (> 15) (gocyclo)
    • Line 1436: warning: cyclomatic complexity 29 of function (*server).Insert() is high (> 15) (gocyclo)
    • Line 1687: warning: cyclomatic complexity 27 of function (*server).MultiInsert() is high (> 15) (gocyclo)
    • Line 2781: warning: cyclomatic complexity 25 of function (*server).MultiRemove() is high (> 15) (gocyclo)
    • Line 71: warning: cyclomatic complexity 23 of function (*server).Exists() is high (> 15) (gocyclo)
    • Line 2937: warning: cyclomatic complexity 22 of function (*server).GetObject() is high (> 15) (gocyclo)
    • Line 1867: warning: cyclomatic complexity 21 of function (*server).Update() is high (> 15) (gocyclo)
    • Line 2603: warning: cyclomatic complexity 20 of function (*server).Remove() is high (> 15) (gocyclo)
    • Line 2242: warning: cyclomatic complexity 18 of function (*server).Upsert() is high (> 15) (gocyclo)
    • Line 2096: warning: cyclomatic complexity 18 of function (*server).MultiUpdate() is high (> 15) (gocyclo)
    • internal/net/dialer_test.go
    • Line 802: warning: cyclomatic complexity 55 of function Test_dialer_cachedDialer() is high (> 15) (gocyclo)
    • Line 1578: warning: cyclomatic complexity 26 of function Test_dialer_tlsHandshake() is high (> 15) (gocyclo)
    • Line 231: warning: cyclomatic complexity 25 of function TestNewDialer() is high (> 15) (gocyclo)
    • Line 583: warning: cyclomatic complexity 19 of function Test_dialer_StartDialerCache() is high (> 15) (gocyclo)
    • Line 441: warning: cyclomatic complexity 18 of function Test_dialer_lookup() is high (> 15) (gocyclo)
    • Line 44: warning: cyclomatic complexity 17 of function Test_dialerCache_IP() is high (> 15) (gocyclo)
    • Line 1294: warning: cyclomatic complexity 16 of function Test_dialer_dial() is high (> 15) (gocyclo)
    • pkg/gateway/filter/handler/grpc/handler.go
    • Line 2599: warning: cyclomatic complexity 19 of function (*server).Update() is high (> 15) (gocyclo)
    • Line 2321: warning: cyclomatic complexity 19 of function (*server).Insert() is high (> 15) (gocyclo)
    • Line 2856: warning: cyclomatic complexity 19 of function (*server).Upsert() is high (> 15) (gocyclo)
    • Line 1368: warning: cyclomatic complexity 19 of function (*server).Search() is high (> 15) (gocyclo)
    • Line 1856: warning: cyclomatic complexity 18 of function (*server).LinearSearch() is high (> 15) (gocyclo)
    • internal/info/info_test.go
    • Line 796: warning: cyclomatic complexity 20 of function Test_info_Get() is high (> 15) (gocyclo)
    • Line 1153: warning: cyclomatic complexity 16 of function Test_info_prepare() is high (> 15) (gocyclo)
    • internal/net/grpc/pool/pool.go
    • Line 150: warning: cyclomatic complexity 18 of function (*pool).Connect() is high (> 15) (gocyclo)
    • Line 80: warning: cyclomatic complexity 16 of function New() is high (> 15) (gocyclo)
    • Line 482: warning: cyclomatic complexity 16 of function (*poolConn).Close() is high (> 15) (gocyclo)
    • internal/core/algorithm/ngt/ngt_test.go
    • Line 221: warning: cyclomatic complexity 60 of function TestLoad() is high (> 15) (gocyclo)
    • Line 3963: warning: cyclomatic complexity 38 of function Test_ngt_BulkRemove() is high (> 15) (gocyclo)
    • Line 3475: warning: cyclomatic complexity 27 of function Test_ngt_SaveIndex() is high (> 15) (gocyclo)
    • Line 3218: warning: cyclomatic complexity 26 of function Test_ngt_CreateIndex() is high (> 15) (gocyclo)
    • Line 2961: warning: cyclomatic complexity 26 of function Test_ngt_CreateAndSaveIndex() is high (> 15) (gocyclo)
    • Line 2355: warning: cyclomatic complexity 25 of function Test_ngt_BulkInsert() is high (> 15) (gocyclo)
    • Line 3729: warning: cyclomatic complexity 24 of function Test_ngt_Remove() is high (> 15) (gocyclo)
    • Line 1836: warning: cyclomatic complexity 23 of function Test_ngt_Insert() is high (> 15) (gocyclo)
    • Line 630: warning: cyclomatic complexity 23 of function Test_gen() is high (> 15) (gocyclo)
    • Line 2667: warning: cyclomatic complexity 20 of function Test_ngt_BulkInsertCommit() is high (> 15) (gocyclo)
    • Line 2102: warning: cyclomatic complexity 18 of function Test_ngt_InsertCommit() is high (> 15) (gocyclo)
    • Line 4287: warning: cyclomatic complexity 17 of function Test_ngt_GetVector() is high (> 15) (gocyclo)
    • Line 1052: warning: cyclomatic complexity 16 of function Test_ngt_open() is high (> 15) (gocyclo)
    • pkg/agent/core/ngt/handler/grpc/insert_test.go
    • Line 2690: warning: cyclomatic complexity 146 of function Test_server_MultiInsert() is high (> 15) (gocyclo)
    • Line 1379: warning: cyclomatic complexity 59 of function Test_server_StreamInsert() is high (> 15) (gocyclo)
    • Line 40: warning: cyclomatic complexity 17 of function Test_server_Insert() is high (> 15) (gocyclo)
    • pkg/agent/core/ngt/service/ngt.go
    • Line 219: warning: cyclomatic complexity 44 of function (*ngt).load() is high (> 15) (gocyclo)
    • Line 980: warning: cyclomatic complexity 24 of function (*ngt).saveIndex() is high (> 15) (gocyclo)
    • Line 364: warning: cyclomatic complexity 19 of function (*ngt).initNGT() is high (> 15) (gocyclo)
    • Line 819: warning: cyclomatic complexity 19 of function (*ngt).CreateIndex() is high (> 15) (gocyclo)
    • Line 500: warning: cyclomatic complexity 18 of function (*ngt).Start() is high (> 15) (gocyclo)
    • Line 144: warning: cyclomatic complexity 16 of function New() is high (> 15) (gocyclo)
    • pkg/agent/core/ngt/service/kvs/kvs_test.go
    • Line 1120: warning: cyclomatic complexity 29 of function Test_bidi_DeleteInverse() is high (> 15) (gocyclo)
    • Line 851: warning: cyclomatic complexity 29 of function Test_bidi_Delete() is high (> 15) (gocyclo)
    • Line 590: warning: cyclomatic complexity 18 of function Test_bidi_Set() is high (> 15) (gocyclo)
    • Line 1390: warning: cyclomatic complexity 18 of function Test_bidi_Range() is high (> 15) (gocyclo)
    • internal/file/file_test.go
    • Line 231: warning: cyclomatic complexity 19 of function TestExists() is high (> 15) (gocyclo)
    • Line 33: warning: cyclomatic complexity 17 of function TestOpen() is high (> 15) (gocyclo)
    • internal/file/file.go
    • Line 95: warning: cyclomatic complexity 26 of function moveDir() is high (> 15) (gocyclo)
    • Line 272: warning: cyclomatic complexity 23 of function writeFile() is high (> 15) (gocyclo)
    • Line 213: warning: cyclomatic complexity 19 of function CopyFileWithPerm() is high (> 15) (gocyclo)
    • internal/net/net_test.go
    • Line 536: warning: cyclomatic complexity 19 of function TestScanPorts() is high (> 15) (gocyclo)
    • Line 230: warning: cyclomatic complexity 17 of function TestParse() is high (> 15) (gocyclo)
    • pkg/agent/core/ngt/service/vqueue/queue_test.go
    • Line 619: warning: cyclomatic complexity 19 of function Test_vqueue_GetVector() is high (> 15) (gocyclo)
    • Line 1363: warning: cyclomatic complexity 18 of function Test_vqueue_DVExists() is high (> 15) (gocyclo)
    • Line 997: warning: cyclomatic complexity 18 of function Test_vqueue_IVExists() is high (> 15) (gocyclo)
    • internal/tls/tls_test.go
    • Line 315: warning: cyclomatic complexity 18 of function TestNewX509CertPool() is high (> 15) (gocyclo)
    • Line 38: warning: cyclomatic complexity 16 of function TestNew() is high (> 15) (gocyclo)
    • internal/net/grpc/client.go
    • Line 148: warning: cyclomatic complexity 41 of function (*gRPCClient).StartConnectionMonitor() is high (> 15) (gocyclo)
    • Line 561: warning: cyclomatic complexity 22 of function (*gRPCClient).do() is high (> 15) (gocyclo)
    • Line 462: warning: cyclomatic complexity 21 of function (*gRPCClient).RoundRobin() is high (> 15) (gocyclo)
    • Line 660: warning: cyclomatic complexity 21 of function (*gRPCClient).Connect() is high (> 15) (gocyclo)
    • internal/net/dialer.go
    • Line 343: warning: cyclomatic complexity 21 of function (*dialer).tlsHandshake() is high (> 15) (gocyclo)
    • Line 229: warning: cyclomatic complexity 16 of function (*dialer).cachedDialer() is high (> 15) (gocyclo)
    • pkg/agent/core/ngt/handler/grpc/index_test.go
    • Line 1029: warning: cyclomatic complexity 81 of function Test_server_CreateAndSaveIndex() is high (> 15) (gocyclo)
    • Line 509: warning: cyclomatic complexity 57 of function Test_server_SaveIndex() is high (> 15) (gocyclo)
    • Line 1909: warning: cyclomatic complexity 43 of function Test_server_IndexInfo() is high (> 15) (gocyclo)
    • Line 39: warning: cyclomatic complexity 34 of function Test_server_CreateIndex() is high (> 15) (gocyclo)
    • internal/file/watch/watch_test.go
    • Line 297: warning: cyclomatic complexity 25 of function Test_watch_Start() is high (> 15) (gocyclo)
    • Line 827: warning: cyclomatic complexity 18 of function Test_watch_Remove() is high (> 15) (gocyclo)
    • Line 1000: warning: cyclomatic complexity 18 of function Test_watch_Stop() is high (> 15) (gocyclo)
    • Line 140: warning: cyclomatic complexity 16 of function Test_watch_init() is high (> 15) (gocyclo)
    • internal/servers/server/server.go
    • Line 131: warning: cyclomatic complexity 28 of function New() is high (> 15) (gocyclo)
    • Line 256: warning: cyclomatic complexity 25 of function (*server).ListenAndServe() is high (> 15) (gocyclo)
    • Line 343: warning: cyclomatic complexity 23 of function (*server).Shutdown() is high (> 15) (gocyclo)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!