Preparing report...

Report for github.com/hello2dj/ledisdb

(v0.0.0-20230603045119-0fe6ae513d2a)

A+    Excellent!    Found 50 issues across 136 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!


gofmt87%

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


ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


gocyclo75%

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.

    • ledis/sort.go
    • Line 125: warning: cyclomatic complexity 17 of function (*DB).xsort() is high (> 15) (gocyclo)
    • ledis/t_kv.go
    • Line 551: warning: cyclomatic complexity 22 of function (*DB).BitOP() is high (> 15) (gocyclo)
    • ledis/dump.go
    • Line 124: warning: cyclomatic complexity 17 of function (*Ledis).LoadDump() is high (> 15) (gocyclo)
    • ledis/t_zset_test.go
    • Line 120: warning: cyclomatic complexity 27 of function TestZSetOrder() is high (> 15) (gocyclo)
    • Line 58: warning: cyclomatic complexity 19 of function TestDBZSet() is high (> 15) (gocyclo)
    • ledis/t_list_test.go
    • Line 33: warning: cyclomatic complexity 22 of function TestListTrim() is high (> 15) (gocyclo)
    • Line 120: warning: cyclomatic complexity 16 of function TestDBList() is high (> 15) (gocyclo)
    • Line 285: warning: cyclomatic complexity 16 of function TestListPop() is high (> 15) (gocyclo)
    • server/cmd_kv_test.go
    • Line 9: warning: cyclomatic complexity 44 of function TestKV() is high (> 15) (gocyclo)
    • Line 214: warning: cyclomatic complexity 20 of function TestKVErrorParams() is high (> 15) (gocyclo)
    • server/cmd_hash_test.go
    • Line 232: warning: cyclomatic complexity 20 of function TestHashErrorParams() is high (> 15) (gocyclo)
    • Line 11: warning: cyclomatic complexity 19 of function TestHash() is high (> 15) (gocyclo)
    • server/cmd_zset.go
    • Line 122: warning: cyclomatic complexity 16 of function zparseScoreRange() is high (> 15) (gocyclo)
    • Line 523: warning: cyclomatic complexity 16 of function zparseZsetoptStore() is high (> 15) (gocyclo)
    • ledis/event.go
    • Line 13: warning: cyclomatic complexity 27 of function formatEventKey() is high (> 15) (gocyclo)
    • ledis/t_set_test.go
    • Line 32: warning: cyclomatic complexity 24 of function TestDBSet() is high (> 15) (gocyclo)
    • Line 205: warning: cyclomatic complexity 17 of function testInter() is high (> 15) (gocyclo)
    • Line 281: warning: cyclomatic complexity 16 of function testDiff() is high (> 15) (gocyclo)
    • server/app.go
    • Line 87: warning: cyclomatic complexity 21 of function NewApp() is high (> 15) (gocyclo)
    • ledis/t_zset.go
    • Line 931: warning: cyclomatic complexity 16 of function (*DB).ZInterStore() is high (> 15) (gocyclo)
    • server/cmd_zset_test.go
    • Line 448: warning: cyclomatic complexity 37 of function TestZsetErrorParams() is high (> 15) (gocyclo)
    • Line 12: warning: cyclomatic complexity 35 of function TestZSet() is high (> 15) (gocyclo)
    • Line 335: warning: cyclomatic complexity 30 of function TestZSetRange() is high (> 15) (gocyclo)
    • Line 241: warning: cyclomatic complexity 24 of function TestZSetRangeScore() is high (> 15) (gocyclo)
    • Line 671: warning: cyclomatic complexity 21 of function TestZInterStore() is high (> 15) (gocyclo)
    • Line 122: warning: cyclomatic complexity 18 of function TestZSetCount() is high (> 15) (gocyclo)
    • server/script.go
    • Line 365: warning: cyclomatic complexity 18 of function luaValueToLedisValue() is high (> 15) (gocyclo)
    • server/cmd_list_test.go
    • Line 57: warning: cyclomatic complexity 33 of function TestList() is high (> 15) (gocyclo)
    • Line 399: warning: cyclomatic complexity 21 of function TestTrim() is high (> 15) (gocyclo)
    • Line 300: warning: cyclomatic complexity 20 of function TestRPopLPush() is high (> 15) (gocyclo)
    • Line 237: warning: cyclomatic complexity 19 of function TestPop() is high (> 15) (gocyclo)
    • Line 465: warning: cyclomatic complexity 16 of function TestListErrorParams() is high (> 15) (gocyclo)
    • server/cmd_set_test.go
    • Line 9: warning: cyclomatic complexity 33 of function TestSet() is high (> 15) (gocyclo)
    • Line 116: warning: cyclomatic complexity 25 of function TestSetErrorParams() is high (> 15) (gocyclo)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


misspell98%

Misspell Finds commonly misspelled English words

    • ledis/t_ttl_test.go
    • Line 52: warning: "eles" is a misspelling of "eels" (misspell)
    • Line 55: warning: "eles" is a misspelling of "eels" (misspell)
    • Line 55: warning: "eles" is a misspelling of "eels" (misspell)
    • Line 58: warning: "eles" is a misspelling of "eels" (misspell)
    • Line 165: warning: "eles" is a misspelling of "eels" (misspell)
    • Line 168: warning: "eles" is a misspelling of "eels" (misspell)
    • Line 168: warning: "eles" is a misspelling of "eels" (misspell)
    • Line 171: warning: "eles" is a misspelling of "eels" (misspell)