Preparing report...

Report for github.com/grpc/grpc-go

A+    Excellent!    Found 54 issues across 562 files

Tweet

gofmt100%

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

No problems detected. Good job!


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!


golint100%

Golint is a linter for Go source code.

No problems detected. Good job!


gocyclo90%

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.

    • grpc-go/test/channelz_test.go
    • Line 864: warning: cyclomatic complexity 35 of function (s).TestCZClientSocketMetricsStreamsAndMessagesCount() is high (> 15) (gocyclo)
    • Line 1048: warning: cyclomatic complexity 26 of function (s).TestCZClientAndServerSocketMetricsFlowControl() is high (> 15) (gocyclo)
    • Line 1472: warning: cyclomatic complexity 23 of function (s).TestCZSubChannelTraceCreationDeletion() is high (> 15) (gocyclo)
    • Line 1741: warning: cyclomatic complexity 22 of function (s).TestCZSubChannelConnectivityState() is high (> 15) (gocyclo)
    • Line 1214: warning: cyclomatic complexity 21 of function (s).TestCZServerSocketMetricsStreamsAndMessagesCount() is high (> 15) (gocyclo)
    • Line 964: warning: cyclomatic complexity 20 of function (s).TestCZClientAndServerSocketMetricsStreamsCountFlowControlRSTStream() is high (> 15) (gocyclo)
    • Line 1397: warning: cyclomatic complexity 18 of function (s).TestCZChannelTraceCreationDeletion() is high (> 15) (gocyclo)
    • Line 1564: warning: cyclomatic complexity 18 of function (s).TestCZChannelAddressResolutionChange() is high (> 15) (gocyclo)
    • Line 500: warning: cyclomatic complexity 18 of function (s).TestCZChannelMetrics() is high (> 15) (gocyclo)
    • grpc-go/xds/csds/csds_test.go
    • Line 488: warning: cyclomatic complexity 23 of function checkForNACKed() is high (> 15) (gocyclo)
    • Line 313: warning: cyclomatic complexity 19 of function checkForRequested() is high (> 15) (gocyclo)
    • Line 391: warning: cyclomatic complexity 19 of function checkForACKed() is high (> 15) (gocyclo)
    • Line 161: warning: cyclomatic complexity 16 of function TestCSDS() is high (> 15) (gocyclo)
    • grpc-go/security/advancedtls/advancedtls.go
    • Line 275: warning: cyclomatic complexity 22 of function (*ServerOptions).config() is high (> 15) (gocyclo)
    • Line 204: warning: cyclomatic complexity 19 of function (*ClientOptions).config() is high (> 15) (gocyclo)
    • Line 448: warning: cyclomatic complexity 17 of function buildVerifyFunc() is high (> 15) (gocyclo)
    • grpc-go/internal/transport/transport_test.go
    • Line 1135: warning: cyclomatic complexity 25 of function (s).TestServerWithMisbehavedClient() is high (> 15) (gocyclo)
    • Line 1472: warning: cyclomatic complexity 19 of function testFlowControlAccountCheck() is high (> 15) (gocyclo)
    • Line 1668: warning: cyclomatic complexity 19 of function (s).TestServerWithClientSendingWrongMethod() is high (> 15) (gocyclo)
    • Line 1235: warning: cyclomatic complexity 19 of function (s).TestClientWithMisbehavedServer() is high (> 15) (gocyclo)
    • Line 302: warning: cyclomatic complexity 16 of function (*server).start() is high (> 15) (gocyclo)
    • grpc-go/xds/internal/balancer/clusterresolver/resource_resolver_test.go
    • Line 218: warning: cyclomatic complexity 21 of function (s).TestResourceResolverChangeEDSName() is high (> 15) (gocyclo)
    • Line 454: warning: cyclomatic complexity 20 of function (s).TestResourceResolverChangePriority() is high (> 15) (gocyclo)
    • Line 341: warning: cyclomatic complexity 19 of function (s).TestResourceResolverNoChangeNoUpdate() is high (> 15) (gocyclo)
    • Line 747: warning: cyclomatic complexity 16 of function (s).TestResourceResolverError() is high (> 15) (gocyclo)
    • Line 664: warning: cyclomatic complexity 16 of function (s).TestResourceResolverChangeFromEDSToDNS() is high (> 15) (gocyclo)
    • grpc-go/stats/stats_test.go
    • Line 1061: warning: cyclomatic complexity 28 of function checkClientStats() is high (> 15) (gocyclo)
    • Line 469: warning: cyclomatic complexity 16 of function checkInHeader() is high (> 15) (gocyclo)
    • grpc-go/test/server_test.go
    • Line 195: warning: cyclomatic complexity 21 of function (s).TestChainStreamServerInterceptor() is high (> 15) (gocyclo)
    • Line 35: warning: cyclomatic complexity 18 of function (s).TestChainUnaryServerInterceptor() is high (> 15) (gocyclo)
    • grpc-go/test/end2end_test.go
    • Line 1840: warning: cyclomatic complexity 48 of function (s).TestServiceConfigMaxMsgSize() is high (> 15) (gocyclo)
    • Line 6123: warning: cyclomatic complexity 42 of function testServiceConfigMaxMsgSizeTD() is high (> 15) (gocyclo)
    • Line 569: warning: cyclomatic complexity 26 of function (*test).listenAndServe() is high (> 15) (gocyclo)
    • Line 754: warning: cyclomatic complexity 22 of function (*test).configDial() is high (> 15) (gocyclo)
    • Line 177: warning: cyclomatic complexity 21 of function (*testServer).UnaryCall() is high (> 15) (gocyclo)
    • Line 299: warning: cyclomatic complexity 19 of function (*testServer).FullDuplexCall() is high (> 15) (gocyclo)
    • grpc-go/test/healthcheck_test.go
    • Line 289: warning: cyclomatic complexity 17 of function (s).TestHealthCheckWithGoAway() is high (> 15) (gocyclo)
    • Line 445: warning: cyclomatic complexity 17 of function (s).TestHealthCheckWithAddrConnDrain() is high (> 15) (gocyclo)
    • grpc-go/internal/transport/http2_client.go
    • Line 187: warning: cyclomatic complexity 39 of function newHTTP2Client() is high (> 15) (gocyclo)
    • Line 1272: warning: cyclomatic complexity 36 of function (*http2Client).operateHeaders() is high (> 15) (gocyclo)
    • Line 633: warning: cyclomatic complexity 34 of function (*http2Client).NewStream() is high (> 15) (gocyclo)
    • Line 464: warning: cyclomatic complexity 21 of function (*http2Client).createHeaderFields() is high (> 15) (gocyclo)
    • Line 1470: warning: cyclomatic complexity 19 of function (*http2Client).reader() is high (> 15) (gocyclo)
    • grpc-go/xds/internal/xdsclient/xds.go
    • Line 363: warning: cyclomatic complexity 43 of function routesProtoToSlice() is high (> 15) (gocyclo)
    • Line 597: warning: cyclomatic complexity 23 of function validateClusterAndConstructClusterUpdate() is high (> 15) (gocyclo)
    • Line 933: warning: cyclomatic complexity 20 of function processAllResources() is high (> 15) (gocyclo)
    • grpc-go/xds/internal/balancer/priority/balancer_test.go
    • Line 192: warning: cyclomatic complexity 25 of function (s).TestPriority_SwitchPriority() is high (> 15) (gocyclo)
    • Line 758: warning: cyclomatic complexity 21 of function (s).TestPriority_RemovesAllPriorities() is high (> 15) (gocyclo)
    • Line 579: warning: cyclomatic complexity 17 of function (s).TestPriority_HigherReadyCloseAllLower() is high (> 15) (gocyclo)
    • grpc-go/internal/transport/http2_server.go
    • Line 333: warning: cyclomatic complexity 36 of function (*http2Server).operateHeaders() is high (> 15) (gocyclo)
    • Line 135: warning: cyclomatic complexity 33 of function NewServerTransport() is high (> 15) (gocyclo)
    • Line 552: warning: cyclomatic complexity 19 of function (*http2Server).HandleStreams() is high (> 15) (gocyclo)
    • Line 1052: warning: cyclomatic complexity 17 of function (*http2Server).keepalive() is high (> 15) (gocyclo)
    • grpc-go/balancer/grpclb/grpclb_test.go
    • Line 526: warning: cyclomatic complexity 27 of function (s).TestDropRequest() is high (> 15) (gocyclo)
    • Line 1101: warning: cyclomatic complexity 21 of function (s).TestGRPCLBPickFirst() is high (> 15) (gocyclo)
    • Line 750: warning: cyclomatic complexity 19 of function (s).TestFallback() is high (> 15) (gocyclo)
    • Line 982: warning: cyclomatic complexity 18 of function (s).TestFallBackWithNoServerAddress() is high (> 15) (gocyclo)
    • Line 221: warning: cyclomatic complexity 17 of function (*remoteBalancer).BalanceLoad() is high (> 15) (gocyclo)
    • Line 880: warning: cyclomatic complexity 16 of function (s).TestExplicitFallback() is high (> 15) (gocyclo)
    • grpc-go/profiling/cmd/catapult.go
    • Line 121: warning: cyclomatic complexity 21 of function streamStatsCatapultJSONSingle() is high (> 15) (gocyclo)
    • Line 306: warning: cyclomatic complexity 17 of function streamStatsCatapultJSON() is high (> 15) (gocyclo)

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!