Preparing report...

Report for c-z.dev/go-micro

(v0.0.0-20220331184351-30c877cc3979)

A+    Excellent!    Found 41 issues across 494 files

Tweet

gofmt99%

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!


gocyclo91%

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.

    • registry/mdns_test.go
    • Line 201: warning: cyclomatic complexity 21 of function TestWatcher() is high (> 15) (gocyclo)
    • Line 9: warning: cyclomatic complexity 19 of function TestMDNS() is high (> 15) (gocyclo)
    • server/grpc/grpc.go
    • Line 826: warning: cyclomatic complexity 31 of function (*grpcServer).Start() is high (> 15) (gocyclo)
    • Line 568: warning: cyclomatic complexity 27 of function (*grpcServer).Register() is high (> 15) (gocyclo)
    • Line 185: warning: cyclomatic complexity 19 of function (*grpcServer).handler() is high (> 15) (gocyclo)
    • Line 321: warning: cyclomatic complexity 17 of function (*grpcServer).processRequest() is high (> 15) (gocyclo)
    • api/router/util/runtime.go
    • Line 56: warning: cyclomatic complexity 31 of function NewPattern() is high (> 15) (gocyclo)
    • Line 184: warning: cyclomatic complexity 17 of function (Pattern).Match() is high (> 15) (gocyclo)
    • api/handler/rpc/rpc.go
    • Line 246: warning: cyclomatic complexity 43 of function requestPayload() is high (> 15) (gocyclo)
    • Line 77: warning: cyclomatic complexity 18 of function (*rpcHandler).ServeHTTP() is high (> 15) (gocyclo)
    • registry/etcd/etcd.go
    • Line 139: warning: cyclomatic complexity 26 of function (*etcdRegistry).registerNode() is high (> 15) (gocyclo)
    • Line 45: warning: cyclomatic complexity 17 of function configure() is high (> 15) (gocyclo)
    • api/api_test.go
    • Line 8: warning: cyclomatic complexity 25 of function TestEncoding() is high (> 15) (gocyclo)
    • network/default.go
    • Line 767: warning: cyclomatic complexity 62 of function (*network).processNetChan() is high (> 15) (gocyclo)
    • Line 1176: warning: cyclomatic complexity 42 of function (*network).manage() is high (> 15) (gocyclo)
    • Line 637: warning: cyclomatic complexity 24 of function (*network).processCtrlChan() is high (> 15) (gocyclo)
    • Line 1446: warning: cyclomatic complexity 16 of function (*network).sendTo() is high (> 15) (gocyclo)
    • tunnel/default.go
    • Line 594: warning: cyclomatic complexity 51 of function (*tun).listen() is high (> 15) (gocyclo)
    • Line 1166: warning: cyclomatic complexity 27 of function (*tun).Dial() is high (> 15) (gocyclo)
    • Line 383: warning: cyclomatic complexity 17 of function (*tun).process() is high (> 15) (gocyclo)
    • api/handler/rpc/stream.go
    • Line 26: warning: cyclomatic complexity 35 of function serveWebsocket() is high (> 15) (gocyclo)
    • Line 205: warning: cyclomatic complexity 22 of function writeLoop() is high (> 15) (gocyclo)
    • proxy/mucp/mucp.go
    • Line 343: warning: cyclomatic complexity 19 of function (*Proxy).ServeRequest() is high (> 15) (gocyclo)
    • Line 478: warning: cyclomatic complexity 16 of function (*Proxy).serveRequest() is high (> 15) (gocyclo)
    • Line 111: warning: cyclomatic complexity 16 of function (*Proxy).filterRoutes() is high (> 15) (gocyclo)
    • runtime/kubernetes/kubernetes.go
    • Line 68: warning: cyclomatic complexity 20 of function (*kubernetes).getService() is high (> 15) (gocyclo)
    • Line 235: warning: cyclomatic complexity 18 of function (*kubernetes).run() is high (> 15) (gocyclo)
    • tunnel/listener.go
    • Line 29: warning: cyclomatic complexity 20 of function (*tunListener).process() is high (> 15) (gocyclo)
    • server/rpc_server.go
    • Line 133: warning: cyclomatic complexity 36 of function (*rpcServer).ServeConn() is high (> 15) (gocyclo)
    • Line 803: warning: cyclomatic complexity 36 of function (*rpcServer).Start() is high (> 15) (gocyclo)
    • Line 515: warning: cyclomatic complexity 30 of function (*rpcServer).Register() is high (> 15) (gocyclo)
    • tunnel/link.go
    • Line 231: warning: cyclomatic complexity 18 of function (*link).manage() is high (> 15) (gocyclo)
    • api/router/registry/registry.go
    • Line 296: warning: cyclomatic complexity 29 of function (*registryRouter).Endpoint() is high (> 15) (gocyclo)
    • Line 112: warning: cyclomatic complexity 25 of function (*registryRouter).store() is high (> 15) (gocyclo)
    • router/default.go
    • Line 265: warning: cyclomatic complexity 28 of function (*router).advertiseEvents() is high (> 15) (gocyclo)
    • broker/http.go
    • Line 513: warning: cyclomatic complexity 18 of function (*httpBroker).Publish() 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!