Preparing report...

Report for github.com/go-kratos/kratos

(v1.0.1)

A+    Excellent!    Found 45 issues across 357 files

Tweet

gofmt91%

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!


ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


gocyclo94%

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.

    • tool/kratos-gen-mc/main.go
    • Line 255: warning: cyclomatic complexity 39 of function getKeyValueType() is high (> 15) (gocyclo)
    • Line 179: warning: cyclomatic complexity 20 of function processList() is high (> 15) (gocyclo)
    • Line 444: warning: cyclomatic complexity 18 of function getNewTemplate() is high (> 15) (gocyclo)
    • tool/testgen/gen.go
    • Line 34: warning: cyclomatic complexity 40 of function (*parse).genUTTest() is high (> 15) (gocyclo)
    • Line 337: warning: cyclomatic complexity 22 of function genMonkey() is high (> 15) (gocyclo)
    • pkg/net/http/blademaster/tree.go
    • Line 511: warning: cyclomatic complexity 37 of function (*node).findCaseInsensitivePath() is high (> 15) (gocyclo)
    • Line 370: warning: cyclomatic complexity 37 of function (*node).getValue() is high (> 15) (gocyclo)
    • Line 125: warning: cyclomatic complexity 27 of function (*node).addRoute() is high (> 15) (gocyclo)
    • Line 253: warning: cyclomatic complexity 17 of function (*node).insertChild() is high (> 15) (gocyclo)
    • pkg/cache/redis/scan.go
    • Line 141: warning: cyclomatic complexity 25 of function convertAssign() is high (> 15) (gocyclo)
    • Line 411: warning: cyclomatic complexity 21 of function ScanSlice() is high (> 15) (gocyclo)
    • Line 263: warning: cyclomatic complexity 16 of function compileStructSpec() is high (> 15) (gocyclo)
    • tool/kratos-gen-bts/main.go
    • Line 139: warning: cyclomatic complexity 48 of function processList() is high (> 15) (gocyclo)
    • Line 346: warning: cyclomatic complexity 20 of function (*options).Check() is high (> 15) (gocyclo)
    • pkg/net/ip/ip.go
    • Line 9: warning: cyclomatic complexity 17 of function ExternalIP() 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!