Preparing report...

Report for github.com/valyala/fasthttp

(v1.62.0)

A+    Excellent!    Found 23 issues across 137 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.

    • workerpool_test.go
    • Line 82: warning: cyclomatic complexity 22 of function testWorkerPoolMaxWorkersCount() is high (> 15) (gocyclo)
    • cookie_test.go
    • Line 103: warning: cyclomatic complexity 19 of function TestCookieSameSite() is high (> 15) (gocyclo)
    • streaming.go
    • Line 25: warning: cyclomatic complexity 19 of function (*requestStream).Read() is high (> 15) (gocyclo)
    • fs.go
    • Line 1028: warning: cyclomatic complexity 36 of function (*fsHandler).handleRequest() is high (> 15) (gocyclo)
    • streaming_test.go
    • Line 15: warning: cyclomatic complexity 16 of function TestStreamingPipeline() is high (> 15) (gocyclo)
    • cookie.go
    • Line 376: warning: cyclomatic complexity 32 of function (*Cookie).ParseBytes() is high (> 15) (gocyclo)
    • client_test.go
    • Line 1586: warning: cyclomatic complexity 29 of function TestClientFollowRedirects() is high (> 15) (gocyclo)
    • Line 1288: warning: cyclomatic complexity 18 of function TestHostClientPendingRequests() is high (> 15) (gocyclo)
    • Line 2996: warning: cyclomatic complexity 17 of function TestHostClientMaxConnWaitTimeoutWithEarlierDeadline() is high (> 15) (gocyclo)
    • fs_fs_test.go
    • Line 328: warning: cyclomatic complexity 23 of function testFSFSCompress() is high (> 15) (gocyclo)
    • Line 56: warning: cyclomatic complexity 20 of function TestFSServeFileCompressed() is high (> 15) (gocyclo)
    • Line 554: warning: cyclomatic complexity 20 of function TestDirFSServeFileCompressed() is high (> 15) (gocyclo)
    • header_test.go
    • Line 1896: warning: cyclomatic complexity 22 of function TestResponseHeaderCookie() is high (> 15) (gocyclo)
    • Line 1698: warning: cyclomatic complexity 20 of function TestResponseHeaderVisitAll() is high (> 15) (gocyclo)
    • Line 325: warning: cyclomatic complexity 20 of function TestRequestRawHeaders() is high (> 15) (gocyclo)
    • Line 1765: warning: cyclomatic complexity 17 of function TestRequestHeaderVisitAll() is high (> 15) (gocyclo)
    • http.go
    • Line 1592: warning: cyclomatic complexity 18 of function (*Request).Write() is high (> 15) (gocyclo)
    • Line 2042: warning: cyclomatic complexity 17 of function (*Response).writeBodyStream() is high (> 15) (gocyclo)
    • server.go
    • Line 2176: warning: cyclomatic complexity 107 of function (*Server).serveConn() is high (> 15) (gocyclo)
    • client.go
    • Line 2991: warning: cyclomatic complexity 32 of function (*transport).RoundTrip() is high (> 15) (gocyclo)
    • Line 2797: warning: cyclomatic complexity 24 of function (*pipelineConnClient).writer() is high (> 15) (gocyclo)
    • Line 1546: warning: cyclomatic complexity 19 of function (*HostClient).AcquireConn() is high (> 15) (gocyclo)
    • Line 1347: warning: cyclomatic complexity 16 of function (*HostClient).Do() is high (> 15) (gocyclo)
    • uri.go
    • Line 563: warning: cyclomatic complexity 23 of function normalizePath() is high (> 15) (gocyclo)
    • Line 439: warning: cyclomatic complexity 21 of function unescape() 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)
    • header.go
    • Line 3087: warning: cyclomatic complexity 33 of function (*RequestHeader).parseHeaders() is high (> 15) (gocyclo)
    • Line 2962: warning: cyclomatic complexity 32 of function (*ResponseHeader).parseHeaders() is high (> 15) (gocyclo)
    • Line 3271: warning: cyclomatic complexity 30 of function (*headerScanner).next() is high (> 15) (gocyclo)
    • Line 548: warning: cyclomatic complexity 24 of function VisitHeaderParams() is high (> 15) (gocyclo)
    • Line 2770: warning: cyclomatic complexity 23 of function isBadTrailer() is high (> 15) (gocyclo)
    • Line 2586: warning: cyclomatic complexity 21 of function (*RequestHeader).AppendBytes() is high (> 15) (gocyclo)
    • Line 2865: warning: cyclomatic complexity 19 of function (*RequestHeader).parseFirstLine() is high (> 15) (gocyclo)
    • Line 2450: warning: cyclomatic complexity 18 of function (*ResponseHeader).AppendBytes() is high (> 15) (gocyclo)
    • Line 1405: warning: cyclomatic complexity 17 of function (*RequestHeader).setSpecialHeader() is high (> 15) (gocyclo)
    • Line 1341: warning: cyclomatic complexity 17 of function (*ResponseHeader).setSpecialHeader() is high (> 15) (gocyclo)
    • server_test.go
    • Line 2141: warning: cyclomatic complexity 25 of function TestCompressHandlerVary() is high (> 15) (gocyclo)
    • Line 1292: 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 1598: warning: cyclomatic complexity 18 of function TestServerHTTP10ConnectionKeepAlive() is high (> 15) (gocyclo)
    • Line 2044: warning: cyclomatic complexity 16 of function TestCompressHandler() is high (> 15) (gocyclo)
    • fs_test.go
    • Line 689: warning: cyclomatic complexity 24 of function testFSCompress() is high (> 15) (gocyclo)
    • Line 203: warning: cyclomatic complexity 20 of function TestServeFileCompressed() is high (> 15) (gocyclo)
    • http_test.go
    • Line 2936: warning: cyclomatic complexity 23 of function TestResponseBodyStream() is high (> 15) (gocyclo)
    • Line 615: warning: cyclomatic complexity 16 of function TestRequestReadMultipartFormWithFile() 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!