Preparing report...

Report for github.com/domsolutions/fasthttp

(v0.0.0-20230414083832-43cc4870e6bf)

A+    Excellent!    Found 20 issues across 120 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!


gocyclo83%

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.

    • http_test.go
    • Line 2968: warning: cyclomatic complexity 19 of function TestResponseBodyStream() is high (> 15) (gocyclo)
    • Line 625: warning: cyclomatic complexity 16 of function TestRequestReadMultipartFormWithFile() is high (> 15) (gocyclo)
    • streaming_test.go
    • Line 15: warning: cyclomatic complexity 16 of function TestStreamingPipeline() is high (> 15) (gocyclo)
    • fs.go
    • Line 811: warning: cyclomatic complexity 35 of function (*fsHandler).handleRequest() is high (> 15) (gocyclo)
    • header.go
    • Line 2891: warning: cyclomatic complexity 29 of function (*RequestHeader).parseHeaders() is high (> 15) (gocyclo)
    • Line 3040: warning: cyclomatic complexity 29 of function (*headerScanner).next() is high (> 15) (gocyclo)
    • Line 2803: warning: cyclomatic complexity 26 of function (*ResponseHeader).parseHeaders() is high (> 15) (gocyclo)
    • Line 2645: warning: cyclomatic complexity 23 of function isBadTrailer() is high (> 15) (gocyclo)
    • Line 2329: warning: cyclomatic complexity 18 of function (*ResponseHeader).AppendBytes() is high (> 15) (gocyclo)
    • Line 1255: warning: cyclomatic complexity 17 of function (*ResponseHeader).setSpecialHeader() is high (> 15) (gocyclo)
    • Line 1318: warning: cyclomatic complexity 16 of function (*RequestHeader).setSpecialHeader() is high (> 15) (gocyclo)
    • workerpool_test.go
    • Line 82: warning: cyclomatic complexity 22 of function testWorkerPoolMaxWorkersCount() is high (> 15) (gocyclo)
    • header_test.go
    • Line 1746: warning: cyclomatic complexity 22 of function TestResponseHeaderCookie() is high (> 15) (gocyclo)
    • Line 1546: warning: cyclomatic complexity 20 of function TestResponseHeaderVisitAll() is high (> 15) (gocyclo)
    • Line 258: warning: cyclomatic complexity 19 of function TestRequestRawHeaders() is high (> 15) (gocyclo)
    • Line 1613: warning: cyclomatic complexity 17 of function TestRequestHeaderVisitAll() is high (> 15) (gocyclo)
    • streaming.go
    • Line 25: warning: cyclomatic complexity 18 of function (*requestStream).Read() is high (> 15) (gocyclo)
    • client.go
    • Line 1314: warning: cyclomatic complexity 43 of function (*HostClient).doNonNilReqResp() is high (> 15) (gocyclo)
    • Line 2738: warning: cyclomatic complexity 24 of function (*pipelineConnClient).writer() is high (> 15) (gocyclo)
    • Line 1526: warning: cyclomatic complexity 19 of function (*HostClient).acquireConn() is high (> 15) (gocyclo)
    • client_test.go
    • Line 1536: warning: cyclomatic complexity 24 of function TestClientFollowRedirects() is high (> 15) (gocyclo)
    • Line 1239: warning: cyclomatic complexity 18 of function TestHostClientPendingRequests() is high (> 15) (gocyclo)
    • Line 2930: warning: cyclomatic complexity 17 of function TestHostClientMaxConnWaitTimeoutWithEarlierDeadline() is high (> 15) (gocyclo)
    • cookie_test.go
    • Line 103: warning: cyclomatic complexity 19 of function TestCookieSameSite() is high (> 15) (gocyclo)
    • http.go
    • Line 1543: warning: cyclomatic complexity 18 of function (*Request).Write() is high (> 15) (gocyclo)
    • Line 1938: warning: cyclomatic complexity 17 of function (*Response).writeBodyStream() is high (> 15) (gocyclo)
    • server.go
    • Line 2109: warning: cyclomatic complexity 99 of function (*Server).serveConn() is high (> 15) (gocyclo)
    • uri.go
    • Line 575: warning: cyclomatic complexity 23 of function normalizePath() is high (> 15) (gocyclo)
    • Line 441: warning: cyclomatic complexity 21 of function unescape() is high (> 15) (gocyclo)
    • server_test.go
    • Line 1231: warning: cyclomatic complexity 21 of function TestServerMultipartFormDataRequest() is high (> 15) (gocyclo)
    • Line 676: warning: cyclomatic complexity 18 of function TestServerResponseBodyStream() is high (> 15) (gocyclo)
    • Line 1537: warning: cyclomatic complexity 18 of function TestServerHTTP10ConnectionKeepAlive() is high (> 15) (gocyclo)
    • Line 1940: warning: cyclomatic complexity 16 of function TestCompressHandler() is high (> 15) (gocyclo)
    • args_test.go
    • Line 38: warning: cyclomatic complexity 19 of function TestArgsAdd() is high (> 15) (gocyclo)
    • Line 416: warning: cyclomatic complexity 17 of function TestArgsSetGetDel() is high (> 15) (gocyclo)
    • cookie.go
    • Line 341: warning: cyclomatic complexity 30 of function (*Cookie).ParseBytes() 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!